/*     */ package com.newcrm.config;
/*     */ 
/*     */ public class Const
/*     */ {
/*     */   public static final String VERSION = "3.6.0.2";
/*     */   public static final String OPERATION_ADD = "new";
/*     */   public static final String OPERATION_LIST = "list";
/*     */   public static final String OPERATION_OPEN = "open";
/*     */   public static final String OPERATION_CLOSE = "close";
/*     */   public static final String OPERATION_DELETE = "delete";
/*     */   public static final String OPERATION_ALLREAD = "readed";
/*     */   public static final String OPERATION_LOGICDELETE = "logicDelete";
/*     */   public static final String OPERATION_DELETERELATION = "deleteRelation";
/*     */   public static final String OPERATION_REMOVESHARE = "removeShare";
/*     */   public static final String OPERATION_ADDSHARE = "addShare";
/*     */   public static final String OPERATION_UPDATE = "update";
/*     */   public static final String OPERATION_UPLOAD = "upload";
/*     */   public static final String OPERATION_SAVE = "save";
/*     */   public static final String OPERATION_CHECKNEW = "checkNew";
/*     */   public static final String OPERATION_UNDO = "undo";
/*     */   public static final String OPERATION_SEARCH = "search";
/*     */   public static final String OPERATION_ADVSEARCH = "advsearch";
/*     */   public static final String OPERATION_SHOWADVSEARCH = "showAdvsearch";
/*     */   public static final String OPERATION_CHART = "chart";
/*     */   public static final String OPERATION_RESULT = "result";
/*     */   public static final String OPERATION_LOGIN = "login";
/*     */   public static final String OPERATION_CHANGEVISIBILITY = "changeVisibility";
/*     */   public static final String OPERATION_CHANGECATEGORY = "changeCategory";
/*     */   public static final String OPERATION_CHANGENEXTCONTACTDATE = "changeNextContactDate";
/*     */   public static final String OPERATION_CONFIRM_DESTROY = "confirm_destroy";
/*     */   public static final String OPERATION_EDIT = "edit";
/*     */   public static final String OPERATION_TAGS = "tags";
/*     */   public static final String OPERATION_NAME = "name";
/*     */   public static final String OPERATION_LAST = "last";
/*     */   public static final String OPERATION_PEOPLES = "peoples";
/*     */   public static final String OPERATION_EXTINFO = "extInfo";
/*     */   public static final String OPERATION_PARENTCUSTOMER = "parentCustomer";
/*     */   public static final String OPERATION_REMARKSINFO = "remarksInfo";
/*     */   public static final String OPERATION_EXPORT = "export";
/*     */   public static final String OPERATION_EXPORT_HISTORY = "exportHistory";
/*     */   public static final String OPERATION_EXPORT_CURRENT_NUM = "exportHistoryNum";
/*     */   public static final String OPERATION_EXPORT_DELETE = "deleteExportHistory";
/*     */   public static final String OPERATION_NOTICE = "notice";
/*     */   public static final String OPERATION_STATISTICS = "stat";
/*     */   public static final String OPERATION_DUPLICATES = "duplicates";
/*     */   public static final String OPERATION_AVATAR = "avatar";
/*     */   public static final String OPERATION_JSON = "json";
/*     */   public static final String OPERATION_SORT = "sort";
/*     */   public static final String OPERATION_UPLOADIMAGE = "uploadImage";
/*     */   public static final String OPERATION_HISTORY = "history";
/*     */   public static final String TABLE_CUSTOMER_KEY = "CustomerId";
/*     */   public static final String TABLE_CUSTOMER_EXTINFOS = "ExtInfos";
/*     */   public static final String TABLE_NOTE_KEY = "NoteId";
/*     */   public static final String TABLE_DEAL_KEY = "DealId";
/*     */   public static final String TABLE_TAG_KEY = "TagId";
/*     */   public static final String TABLE_TASK_KEY = "TaskId";
/*     */   public static final String TABLE_MESSAGE_KEY = "MessageId";
/*     */   public static final String TABLE_CUSTOMERFIELD_KEY = "CustomerFieldId";
/*     */   public static final String TABLE_DEALFIELD_KEY = "DealFieldId";
/*     */   public static final String TABLE_CUSTOMERCATEGORY_KEY = "CategoryId";
/*     */   public static final String TABLE_TASKCATEGORY_KEY = "TaskCategoryId";
/*     */   public static final String TABLE_DEALCATEGORY_KEY = "DealCategoryId";
/*     */   public static final String TABLE_EQUIPMENTFIELD_KEY = "EquipmentFieldId";
/*     */   public static final String TABLE_COMPANY_KEY = "CompanyId";
/*     */   public static final String TABLE_IMPORT_KEY = "ImportId";
/*     */   public static final String TABLE_GROUP_KEY = "GroupId";
/*     */   public static final String TABLE_CUSTOMER_EXT_KEY = "CustomerExtId";
/*     */   public static final String TABLE_NOTE_DEFAULT_WORD_KEY = "DefaultWordId";
/*     */   public static final String TABLE_VOIP_CALL_KEY = "VOIPId";
/*     */   public static final String TABLE_EXPORTTASK_KEY = "ExportTaskId";
/*     */   public static final String TABLE_IMPORTANT_DATE = "ImportantDateId";
/*     */   public static final String SQL_CUSTOMER_GET_NAME = "SELECT Name FROM T_Customer_Info WHERE CustomerId = ?";
/*     */   public static final String SQL_COMPANY_LIST = "SELECT A.*,B.QQ,B.Mobile,B.UserId,B.Name,B.Email FROM T_Company_Info AS A INNER JOIN T_User_Info AS B ON A.CompanyId = B.CompanyId AND B.IsCreater = 1 ORDER BY A.CreateDate DESC";
/*     */   public static final String SQL_COMPANY_MAX_USERSNUM = "SELECT LicenceNum FROM T_Company_Info WHERE CompanyId = ?";
/*     */   public static final String SQL_CUSTOMER_UPDATEDATE_SET = "UPDATE T_Customer_Info SET UpdateDate = NOW(), UpdateUserId = ? WHERE CompanyId = ? AND CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_ADD = "INSERT INTO T_Customer_Info (Name,Type,CategoryId,Title,Note,Visible,PermissionsId,CompanyId,CreateUserId,UpdateUserId,CreateDate,UpdateDate,AssignDate,ParentCustomerId,ImportId,LastNoteId,DeleteFlag) VALUES (?,?,?,?,?,?,?,?,?,?,NOW(),NOW(),NOW(),?,?,-1,0)";
/*     */   public static final String SQL_CUSTOMER_ADD_MOBILE = "INSERT INTO T_Customer_Info (Name,Type,CompanyId,CreateUserId,UpdateUserId,CreateDate,UpdateDate,AssignDate,ParentCustomerId,Visible,PermissionsId,LastNoteId,DeleteFlag) VALUES (?,?,?,?,?,NOW(),NOW(),NOW(),?,?,?,-1,0)";
/*     */   public static final String SQL_CUSTOMER_EXT_CLEAR = "DELETE FROM T_Customer_Ext_Info WHERE CompanyId = ? AND CustomerId NOT IN (SELECT CustomerId FROM T_Customer_Info WHERE CompanyId = ?)";
/*     */   public static final String SQL_CUSTOMER_CLEAR_IMPORT = "UPDATE T_Customer_Info SET DeleteFlag = 1, IndexFlag = 0 WHERE ImportId = ?";
/*     */   public static final String SQL_CUSTOMER_IMPORT_LIST = "SELECT A.CustomerId, A.Name, A.ParentCustomerId, B.Name AS ParentCustomerName FROM T_Customer_Info AS A INNER JOIN T_Customer_Info AS B ON A.ParentCustomerId = B.CustomerId WHERE A.Type = ? AND A.ImportId = ? LIMIT 0, 5";
/*     */   public static final String SQL_CUSTOMER_EXT_CLEAR_IMPORT = "DELETE FROM T_Customer_Ext_Info WHERE CustomerId IN (SELECT CustomerId FROM T_Customer_Info WHERE ImportId = ?)";
/*     */   public static final String SQL_CUSTOMER_UPDATE = "UPDATE T_Customer_Info SET Name = ?, CategoryId = ?, Note = ?, Visible = ?, PermissionsId = ?, UpdateDate = NOW(), UpdateUserId = ?, IndexFlag = 0 WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_WITH_ASSIGN_UPDATE = "UPDATE T_Customer_Info SET Name = ?, CategoryId = ?, Note = ?, Visible = ?, PermissionsId = ?, UpdateDate = NOW(), AssignDate = NOW(), UpdateUserId = ?, IndexFlag = 0 WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_IMGPATH_UPDATE = "UPDATE T_Customer_Info SET ImgPath = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_NAME_UPDATE = "UPDATE T_Customer_Info SET Name = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_TITLE_UPDATE = "UPDATE T_Customer_Info SET Title = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_UPDATECATEGORYID = "UPDATE T_Customer_Info SET CategoryId = ?, UpdateUserId = ?, UpdateDate = NOW() WHERE CustomerId = ? OR ParentCustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_UPDATEPERMISSIONSID = "UPDATE T_Customer_Info SET Visible = ?, PermissionsId = ?, UpdateUserId = ?, UpdateDate = NOW(), AssignDate = NOW(), IndexFlag = 0 WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_UPDATEPERMISSIONSID_VISIBILE_ALL = "UPDATE T_Customer_Info SET Visible = ?, PermissionsId = ?, UpdateUserId = ?, UpdateDate = NOW(), AssignDate = NOW(), IndexFlag = 0 WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_PERSON_UPDATEPERMISSIONSID = "UPDATE T_Customer_Info SET Visible = ?, PermissionsId = ?, UpdateUserId = ?, UpdateDate = NOW(), AssignDate = NOW(), IndexFlag = 0 WHERE ParentCustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_PERSON_UPDATEPERMISSIONSID_VISIBILE_ALL = "UPDATE T_Customer_Info SET Visible = ?, PermissionsId = ?, UpdateUserId = ?, UpdateDate = NOW(), AssignDate = NOW(), LastContactDate = NULL, IndexFlag = 0 WHERE ParentCustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_UPDATENEXTCONTACTDATE = "UPDATE T_Customer_Info SET NextContactDate = ?, UpdateUserId = ?, UpdateDate = NOW() WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_LAST_NEXT_CONTACTDATE_UPDATE = "UPDATE T_Customer_Info SET LastNoteId = ?, LastContactDate = ?, NextContactDate = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE CustomerId = ? ";
/*     */   public static final String SQL_CUSTOMER_LAST_NEXT_CONTACTDATE_UPDATE3 = "UPDATE T_Customer_Info SET NextContactDate = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE LastNoteId = ? ";
/*     */   public static final String SQL_CUSTOMER_PEOPLE_UPDATE = "UPDATE T_Customer_Info SET Name = ?, Title = ?, Note = ?, Visible = ?, PermissionsId = ?, ParentCustomerId = ?, UpdateDate = NOW(), UpdateUserId = ?, IndexFlag = 0 WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_PEOPLE_WITHCATEGORY_UPDATE = "UPDATE T_Customer_Info SET Name = ?, Title = ?, Note = ?, Visible = ?, PermissionsId = ?, ParentCustomerId = ?, CategoryId = ?, UpdateDate = NOW(), UpdateUserId = ?, IndexFlag = 0 WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_EXT_ADD = "INSERT INTO T_Customer_Ext_Info (CompanyId,CustomerId,Type,Info1,Info2,Info3,Info4,CreateDate) VALUES (?,?,?,?,?,?,?,NOW())";
/*     */   public static final String SQL_CUSTOMER_EXT_GET = "SELECT FieldValue FROM T_User_Ext_Info WHERE UserId = ? AND FieldType = ?";
/*     */   public static final String SQL_CUSTOMER_SHARE_ADD = "INSERT IGNORE INTO T_Customer_Permissions_Info (CustomerId,OwnerUserId,ShareId,ShareType,CreateDate) VALUES (?,?,?,?,NOW())";
/*     */   public static final String SQL_CUSTOMER_SHARE_DELETE = "DELETE FROM T_Customer_Permissions_Info WHERE CustomerId = ? ";
/*     */   public static final String SQL_CUSTOMER_SHARE_DELETE2 = "DELETE FROM T_Customer_Permissions_Info WHERE OwnerUserId = ? AND CustomerId IN ( ";
/*     */   public static final String SQL_CUSTOMER_EXT_DELETE = "DELETE FROM T_Customer_Ext_Info WHERE CustomerExtId IN (";
/*     */   public static final String SQL_CUSTOMER_EXT_DELETE2 = "DELETE FROM T_Customer_Ext_Info WHERE CustomerExtId = ?";
/*     */   public static final String SQL_CUSTOMER_EXT_UPDATE = "UPDATE T_Customer_Ext_Info SET Info1 = ?, Info2 = ?, Info3 = ?, Info4 = ? WHERE CustomerExtId = ?";
/*     */   public static final String SQL_CUSTOMER_COMPANY_NAME_LIST = "SELECT CustomerId AS id , Name as label, Name as value, Visible, PermissionsId FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND Type = 0 AND Name like ? ";
/*     */   public static final String SQL_CUSTOMER_OPENAPI_QUERY_CUSTOMERID = "SELECT DISTINCT CustomerId, Name FROM T_Customer_Info WHERE 1 > 2 ";
/*     */   public static final String SQL_CUSTOMER_OPENAPI_QUERY_FIELDS = "SELECT CustomerId, Type, Info1 FROM T_Customer_Ext_Info WHERE (Type = ? OR Type = ? OR Type = ? OR Type = ?) ";
/*     */   public static final String SQL_CUSTOMER_NAME_LIST = "SELECT CustomerId AS id, Name as label, Name as value, Type FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND Name like ? ";
/*     */   public static final String SQL_CUSTOMER_LAST_NOTEID = "SELECT LastNoteId FROM T_Customer_Info WHERE CustomerId = ? ";
/*     */   public static final String SQL_CUSTOMER_LAST_NOTEID2 = "SELECT NoteId FROM T_Note_Info WHERE CustomerId = ? AND (SubjectType = ? OR SubjectType = ?) ORDER BY CreateDate DESC LIMIT 0, 1";
/*     */   public static final String SQL_CUSTOMER_LAST_NOTEID_UPDATE = "UPDATE T_Customer_Info SET LastNoteId = ? WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_PERMISSION_CHANGE_LIST = "SELECT * FROM T_Customer_Permissions_Change_Info WHERE CustomerId = ? ORDER BY ChangeDate DESC ";
/*     */   public static final String SQL_CUSTOMER_TOTAL_NUM = "SELECT COUNT(*) FROM T_Customer_Info WHERE DeleteFlag = 0 AND Type = ? AND Visible = ? AND PermissionsId = ?";
/*     */   public static final String SQL_TAGS_LIST = "SELECT TagId, TagName FROM T_Tag_Info WHERE CompanyId = ? ORDER BY CONVERT(TagName USING GBK) ASC, CreateDate DESC";
/*     */   public static final String SQL_TAGS_NAME_LIST = "SELECT TagId AS id, TagName as label FROM T_Tag_Info WHERE CompanyId = ? AND TagName like ? ORDER BY CONVERT(TagName USING GBK) ASC, CreateDate DESC";
/*     */   public static final String SQL_NOTE_ADD = "INSERT INTO T_Note_Info (NoteType,SubjectId,SubjectName,SubjectType,AttachFiles,NoteDate,NextContactDate,Remark,NoteVisible,PermissionsId,CompanyId,DealId,DealName,CreateUserId,UpdateUserId,CreateDate,UpdateDate) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,NOW(),NOW())";
/*     */   public static final String SQL_NOTE_DELETEADMIN = "DELETE FROM T_Note_Info WHERE NoteId = ?";
/*     */   public static final String SQL_NOTE_DELETE = "DELETE FROM T_Note_Info WHERE NoteId = ? AND CreateUserId = ?";
/*     */   public static final String SQL_NOTE_UPDATEADMIN = "UPDATE T_Note_Info SET Remark = ?, NoteDate = ?, NoteVisible = ?, PermissionsId = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE NoteId = ?";
/*     */   public static final String SQL_NOTE_UPDATE = "UPDATE T_Note_Info SET SubjectId = ?, SubjectName = ?, SubjectType = ?, AttachFiles = ?, Remark = ?, DealId = ?, DealName = ?, UpdateDate = NOW(),UpdateUserId = ? WHERE NoteId = ?";
/*     */   public static final String SQL_NOTE_DEAL_UPDATE = "UPDATE T_Note_Info SET AttachFiles = ?, Remark = ?, UpdateDate = NOW(),UpdateUserId = ? WHERE NoteId = ?";
/*     */   public static final String SQL_NOTE_UPDATE2 = "UPDATE T_Note_Info SET NextContactDate = ?, AttachFiles = ?, Remark = ?, UpdateDate = NOW(),UpdateUserId = ? WHERE NoteId = ?";
/*     */   public static final String SQL_NOTE_UPDATEREAMRK = "UPDATE T_Note_Info SET Remark = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE NoteId = ?";
/*     */   public static final String SQL_NOTE_UPDATEREAMRK_CREATER = "UPDATE T_Note_Info SET Remark = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE NoteId = ? AND CreateUserId = ? ";
/*     */   public static final String SQL_NOTE_LIST = "SELECT * FROM T_Note_Info WHERE SubjectType < 2 AND SubjectId IN ( ";
/*     */   public static final String SQL_NOTE_SEARCH_ADMIN = "SELECT * FROM T_Note_Info WHERE NoteType = 2 AND CompanyId = ? AND Remark like ? ORDER BY NoteDate DESC, CreateDate DESC ";
/*     */   public static final String SQL_NOTE_SEARCH_ADMIN_COUNT = "SELECT COUNT(*) FROM T_Note_Info WHERE NoteType = 2 AND CompanyId = ? AND Remark like ? ";
/*     */   public static final String SQL_NOTE_CREATEUSER = "SELECT * FROM T_Note_Info WHERE CreateUserId = ? ORDER BY NoteDate DESC";
/*     */   public static final String SQL_NOTE_CREATEUSER_COUNT = "SELECT COUNT(*) FROM T_Note_Info WHERE CreateUserId = ? ";
/*     */   public static final String SQL_NOTE_SEARCH = "SELECT A.* FROM T_Note_Info AS A INNER JOIN T_Customer_Info AS B ON A.SubjectId = B.CustomerId WHERE B.DeleteFlag = 0 AND A.NoteType = 2 AND A.CompanyId = ? AND A.Remark like ? AND (B.Visible = ? OR (B.Visible = ? AND B.PermissionsId = ?)) ORDER BY A.NoteDate DESC, A.CreateDate DESC ";
/*     */   public static final String SQL_NOTE_GROUPADMIN_SEARCH = "SELECT A.* FROM T_Note_Info AS A INNER JOIN T_Customer_Info AS B ON A.SubjectId = B.CustomerId WHERE B.DeleteFlag = 0 AND A.NoteType = 2 AND A.CompanyId = ? AND A.Remark like ? AND (B.Visible = ? OR (B.Visible = ? AND B.PermissionsId IN (SELECT UserId FROM T_User_Info WHERE CompanyId = ? AND GroupId = ?))) ORDER BY A.NoteDate DESC, A.CreateDate DESC ";
/*     */   public static final String SQL_NOTE_SEARCH_COUNT = "SELECT COUNT(*) FROM T_Note_Info AS A INNER JOIN T_Customer_Info AS B ON A.SubjectId = B.CustomerId WHERE B.DeleteFlag = 0 AND A.NoteType = 2 AND A.CompanyId = ? AND A.Remark like ? AND (B.Visible = ? OR (B.Visible = ? AND B.PermissionsId = ?))";
/*     */   public static final String SQL_NOTE_SEARCH_GROUPADMIN_COUNT = "SELECT COUNT(*) FROM T_Note_Info AS A INNER JOIN T_Customer_Info AS B ON A.SubjectId = B.CustomerId WHERE B.DeleteFlag =0 AND A.NoteType = 2 AND A.CompanyId = ? AND A.Remark like ? AND (B.Visible = ? OR (B.Visible = ? AND B.PermissionsId IN (SELECT UserId FROM T_User_Info WHERE CompanyId = ? AND GroupId = ?)))";
/*     */   public static final String SQL_NOTE_LIST_DEAL = "SELECT * FROM T_Note_Info WHERE DealId = ? ORDER BY NoteDate DESC , CreateDate DESC ";
/*     */   public static final String SQL_NOTE_LIST_DEAL_EXPORT = "SELECT * FROM T_Note_Info WHERE NoteType = 2 AND DealId = ? ORDER BY NoteDate DESC , CreateDate DESC ";
/*     */   public static final String SQL_NOTE_DETAIL = "SELECT A.NoteId, A.NoteDate, A.SubjectId, A.Remark, A.CreateUserId, A.CreateDate, B.Name, B.Type FROM T_Note_Info AS A INNER JOIN T_Customer_Info AS B ON A.SubjectId = B.CustomerId WHERE B.DeleteFlag =0 AND A.NoteId = ?";
/*     */   public static final String SQL_CUSTOMER_DETAIL = "SELECT A.Name, A.CategoryId, A.Note, A.Visible, A.PermissionsId, A.ImgPath, A.CreateUserId, A.AssignDate, A.CreateDate, B.Name AS ParentCustomerName, A.ParentCustomerId, A.Title, A.Type, B.Visible AS ParentVisible, B.PermissionsId AS ParentPermissionsId, B.DeleteFlag AS ParentDeleteFlag FROM T_Customer_Info AS A LEFT JOIN T_Customer_Info AS B ON A.ParentCustomerId = B.CustomerId WHERE A.DeleteFlag = 0 AND A.CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_MINI_DETAIL = "SELECT A.Name, A.Type, A.Visible, A.PermissionsId, B.Visible AS ParentVisible, B.PermissionsId AS ParentPermissionsId FROM T_Customer_Info AS A LEFT JOIN T_Customer_Info AS B ON A.ParentCustomerId = B.CustomerId WHERE A.DeleteFlag = 0 AND A.CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_UPDATE_PEOPLE_VISIBLE = "UPDATE T_Customer_Info SET Visible = ?, PermissionsId = ? WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_SHAREIDS = "SELECT ShareId, ShareType FROM T_Customer_Permissions_Info WHERE CustomerId = ? ";
/*     */   public static final String SQL_CUSTOMER_NAME = "SELECT CustomerId FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND Name = ? AND Type = 0 ";
/*     */   public static final String SQL_CUSTOMER_TEL = "SELECT B.Name FROM T_Customer_Ext_Info AS A LEFT JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND B.CompanyId = ? AND A.Type = ? AND A.Info1 = ?";
/*     */   public static final String SQL_CUSTOMER_QQ = "SELECT B.Name FROM T_Customer_Ext_Info AS A LEFT JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND B.CompanyId = ? AND A.Type = ? AND A.Info1 = ? AND Info3 = ?";
/*     */   public static final String SQL_CUSTOMER_PERMISSIONSID = "SELECT PermissionsId FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_PEOPLE_NAME = "SELECT CustomerId FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND ParentCustomerId = ? AND Name = ? AND Type = 1 ";
/*     */   public static final String SQL_CUSTOMER_NAME2 = "SELECT CustomerId, Visible, PermissionsId, CategoryId FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND Name = ? AND Type = 0 ";
/*     */   public static final String SQL_CUSTOMER_NAME_EXISTCHECK = "SELECT CustomerId, Visible, PermissionsId, CategoryId FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND Name = ? AND Type = 0 ";
/*     */   public static final String SQL_CUSTOMER_PEOPLE_NAME_EXISTCHECK = "SELECT CustomerId FROM T_Customer_Info WHERE DeleteFlag = 0 AND ParentCustomerId = ? AND Name = ? AND Type = 1 ";
/*     */   public static final String SQL_CUSTOMER_EXT_EXISTCHECK = "SELECT Type, Info1 FROM T_Customer_Ext_Info WHERE CustomerId = ? AND Type = ? AND CompanyId = ? ";
/*     */   public static final String SQL_CUSTOMER_EXT = "SELECT * FROM T_Customer_Ext_Info WHERE CustomerId = ? ORDER BY Type ASC, Info3 ASC, CreateDate ASC";
/*     */   public static final String SQL_CUSTOMER_TAGS = "SELECT B.TagId, B.TagName FROM T_Customer_Tag_Info AS A INNER JOIN T_Tag_Info AS B ON A.TagId = B.TagId WHERE A.CustomerId = ? ORDER BY A.CreateDate ASC";
/*     */   public static final String SQL_TAG_SEARCHBYNAME = "SELECT TagId FROM T_Tag_Info WHERE CompanyId = ? AND TagName = ?";
/*     */   public static final String SQL_TAG_SEARCHBYCUSTOMERID = "SELECT B.TagId, B.TagName FROM T_Customer_Tag_Info AS A INNER JOIN T_Tag_Info AS B ON A.TagId = B.TagId WHERE A.CustomerId = ? ORDER BY CONVERT(B.TagName USING GBK) ";
/*     */   public static final String SQL_TAG_UPDATE = "UPDATE T_Tag_Info SET TagName = ? WHERE TagId = ?";
/*     */   public static final String SQL_TAG_ADD = "INSERT INTO T_Tag_Info (TagName,CompanyId,CreateDate,CreateUserId) VALUES (?,?,NOW(),?)";
/*     */   public static final String SQL_TAG_DELETE = "DELETE FROM T_Tag_Info WHERE TagId = ?";
/*     */   public static final String SQL_TAG_CUSTOMER_DELETE = "DELETE FROM T_Customer_Tag_Info WHERE TagId = ?";
/*     */   public static final String SQL_TAG_NAME = "SELECT TagId FROM T_Tag_Info WHERE CompanyId = ? AND TagName = ? AND TagId <> ?";
/*     */   public static final String SQL_CUSTOMERS_TAGS = "SELECT A.CustomerId, B.TagId, B.TagName FROM T_Customer_Tag_Info AS A INNER JOIN T_Tag_Info AS B ON A.TagId = B.TagId WHERE A.CustomerId IN ( ";
/*     */   public static final String SQL_CUSTOMERS_TAGS_MINI = "SELECT CustomerId, TagId FROM T_Customer_Tag_Info WHERE CustomerId IN ( ";
/*     */   public static final String SQL_CUSTOMER_TAG_ADD = "INSERT INTO T_Customer_Tag_Info (CustomerId,TagId,CompanyId,CreateDate,CreateUserId) VALUES (?,?,?,NOW(),?)";
/*     */   public static final String SQL_CUSTOMERS_TAG_ADD = "INSERT IGNORE INTO T_Customer_Tag_Info (CustomerId,TagId,CompanyId,CreateDate,CreateUserId) VALUES (?,?,?,NOW(),?)";
/*     */   public static final String SQL_CUSTOMER_TAG_DELETE = "DELETE FROM T_Customer_Tag_Info WHERE CustomerId = ? AND TagId = ? ";
/*     */   public static final String SQL_CUSTOMER_TAGS_DELETE = "DELETE FROM T_Customer_Tag_Info WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_PEOPLE_LIST = "SELECT CustomerId,Name,Title,Visible,PermissionsId,ImgPath,CreateUserId FROM T_Customer_Info WHERE DeleteFlag = 0 AND ParentCustomerId = ? ";
/*     */   public static final String SQL_CUSTOMER_PEOPLE_MINI_LIST = "SELECT CustomerId, Name FROM T_Customer_Info WHERE DeleteFlag = 0 AND ParentCustomerId = ? ";
/*     */   public static final String SQL_CUSTOMER_INDEX_LIST = "SELECT CustomerId, Type, Name, Title, Visible, PermissionsId, DeleteFlag FROM T_Customer_Info WHERE IndexFlag = 0 LIMIT 0, 100";
/*     */   public static final String SQL_CUSTOMER_EXT_INDEX_LIST = "SELECT CustomerId, Info1 FROM T_Customer_Ext_Info WHERE CustomerId IN (";
/*     */   public static final String SQL_CUSTOMER_INDEX_UPDATE = "UPDATE T_Customer_Info SET IndexFlag = 1 WHERE CustomerId IN (";
/*     */   public static final String SQL_CUSTOMER_INDEX_CLEAR = "UPDATE T_Customer_Info SET IndexFlag = 0 ";
/*     */   public static final String SQL_CUSTOMER_MOVE_COMPANY_PUBLIC = "UPDATE T_Customer_Info SET PermissionsId = '' WHERE CompanyId = ? AND Visible = ? ";
/*     */   public static final String SQL_CUSTOMER_LASTCONTACT_LIST = "SELECT CustomerId,Name FROM T_Customer_Info WHERE DeleteFlag = 0 AND LastContactDate is not null AND Type = ? AND Visible = ? AND PermissionsId = ? ORDER BY LastContactDate DESC LIMIT 0, 10";
/*     */   public static final String SQL_CUSTOMER_DELETE_ADMIN = "UPDATE T_Customer_Info SET DeleteFlag = 1, IndexFlag = 0 WHERE CompanyId = ? AND CustomerId = ? ";
/*     */   public static final String SQL_CUSTOMER_DELETE = "UPDATE T_Customer_Info SET DeleteFlag = 1, IndexFlag = 0 WHERE CompanyId = ? AND CustomerId = ? AND Visible = ? AND PermissionsId = ? ";
/*     */   public static final String SQL_CUSTOMERS_DELETE_ADMIN = "UPDATE T_Customer_Info SET DeleteFlag = 1, IndexFlag = 0 WHERE CompanyId = ? AND CustomerId IN (";
/*     */   public static final String SQL_CUSTOMERS_DELETE = "UPDATE T_Customer_Info SET DeleteFlag = 1, IndexFlag = 0 WHERE CompanyId = ? AND Visible = ? AND PermissionsId = ? AND CustomerId IN (";
/*     */   public static final String SQL_CUSTOMER_LIST_NAME_BY_ID = "SELECT CustomerId, Name FROM T_Customer_Info WHERE CompanyId = ? AND CustomerId IN (";
/*     */   public static final String SQL_CUSTOMER_EXTINFO_DELETE = "DELETE FROM T_Customer_Ext_Info WHERE CustomerId = ? ";
/*     */   public static final String SQL_CUSTOMER_NOTE_DELETE = "DELETE FROM T_Note_Info WHERE (SubjectType = 0 OR SubjectType = 1) AND SubjectId = ? ";
/*     */   public static final String SQL_CUSTOMER_TAG_ALL_DELETE = "DELETE FROM T_Customer_Tag_Info WHERE CustomerId = ? ";
/*     */   public static final String SQL_CUSTOMER_PEOPLE_CLEAR = "DELETE FROM T_Customer_Info WHERE ParentCustomerId = ? ";
/*     */   public static final String SQL_CUSTOMER_EXT_PEOPLE_CLEAR = "DELETE FROM T_Customer_Ext_Info WHERE CustomerId IN ( SELECT CustomerId FROM T_Customer_Info WHERE ParentCustomerId = ? ) ";
/*     */   public static final String SQL_NOTE_PEOPLE_CLEAR = "DELETE FROM T_Note_Info WHERE (SubjectType = 0 OR SubjectType = 1) AND SubjectId IN ( SELECT CustomerId FROM T_Customer_Info WHERE ParentCustomerId = ? ) ";
/*     */   public static final String SQL_CUSTOMER_DEAL_PEOPLE_CLEAR = "DELETE FROM T_Customer_Deal_Info WHERE CustomerId  IN ( SELECT CustomerId FROM T_Customer_Info WHERE ParentCustomerId = ? ) ";
/*     */   public static final String SQL_DEAL_PEOPLE_CLEAR = "DELETE FROM T_Deal_Info WHERE CustomerId IN (SELECT CustomerId FROM T_Customer_Info WHERE ParentCustomerId = ?) ";
/*     */   public static final String SQL_TAG_PEOPLE_CLEAR = "DELETE FROM T_Customer_Tag_Info WHERE CustomerId  IN ( SELECT CustomerId FROM T_Customer_Info WHERE ParentCustomerId = ? ) ";
/*     */   public static final String SQL_CUSTOMER_COMPANY_PEOPLES = "SELECT CustomerId, Name, ParentCustomerId FROM T_Customer_Info WHERE DeleteFlag = 0 AND ParentCustomerId IN (";
/*     */   public static final String SQL_CUSTOMER_COMPANY_PEOPLES_MIN = "SELECT CustomerId, Name, Title, CreateUserId FROM T_Customer_Info WHERE DeleteFlag = 0 AND ParentCustomerId  = ? ORDER BY CustomerId DESC ";
/*     */   public static final String SQL_CUSTOMERS_NAME = "SELECT CustomerId, Name, Type FROM T_Customer_Info WHERE CompanyId = ? AND DeleteFlag = 0 AND CustomerId IN ( ";
/*     */   public static final String SQL_CUSTOMER_RIGHT_INFO = "SELECT Type, Visible,PermissionsId,ParentCustomerId FROM T_Customer_Info WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_EXT_INFO = "SELECT Type, Info1, CustomerId AS Id FROM T_Customer_Ext_Info WHERE CustomerId IN (";
/*     */   public static final String SQL_PARENT_CUSTOMER_INFO = "SELECT CustomerId, Name AS ParentCustomerName FROM T_Customer_Info WHERE CustomerId IN (";
/*     */   public static final String SQL_LAST_REMARKS_INFO = "SELECT B.NoteId, B.Remark AS NoteRemark, B.NoteDate, B.CreateUserId AS NoteCreateUserId FROM T_Customer_Info AS A LEFT JOIN T_Note_Info AS B ON A.LastNoteId = B.NoteId WHERE A.CustomerId IN (";
/*     */   public static final String SQL_CUSTOMER_EXT_PHONE_INFO = "SELECT Info1, CustomerId FROM T_Customer_Ext_Info WHERE Type = ? AND CustomerId IN (";
/*     */   public static final String SQL_PEOPLE_CUSTOMER_EXT_INFO = "SELECT A.Type, A.Info1, B.ParentCustomerId AS Id FROM T_Customer_Ext_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.ParentCustomerId IN (";
/*     */   public static final String SQL_COMPANY_PHONE_INFO = "SELECT A.Info1 AS Phone, B.Name FROM T_Customer_Ext_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE A.Type = ? AND ( A.CustomerId = ?  OR A.CustomerId IN (SELECT CustomerId FROM T_Customer_Info WHERE ParentCustomerId = ?))";
/*     */   public static final String SQL_PEOPLE_PHONE_INFO = "SELECT A.Info1 AS Phone, B.Name FROM T_Customer_Ext_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE A.Type = ? AND A.CustomerId = ? ";
/*     */   public static final String SQL_PEOPLE_NAME = "SELECT Name, Title, ParentCustomerId AS Id FROM T_Customer_Info WHERE ParentCustomerId IN (";
/*     */   public static final String SQL_CUSTOMER_ALLEXT_INFO = "SELECT Type, Info1, Info2, Info3, CustomerId FROM T_Customer_Ext_Info WHERE CustomerId IN (";
/*     */   public static final String SQL_DEAL_EXT_INFO = "SELECT Type, Info1, DealId FROM T_Deal_Ext_Info WHERE DealId IN (";
/*     */   public static final String SQL_SMS_MSG_ADD = "INSERT INTO T_Company_SMS_Msg_Info (mobiles,msg,CustomerId,ParentCustomerId,SendUserId,CreateDate) VALUES (?,?,?,?,?,NOW())";
/*     */   public static final String SQL_SMS_MSG_PEOPLE_LIST = "SELECT * FROM T_Company_SMS_Msg_Info WHERE CustomerId = ? ORDER BY CreateDate DESC";
/*     */   public static final String SQL_SMS_MSG_COMPANY_LIST = "SELECT * FROM T_Company_SMS_Msg_Info WHERE ParentCustomerId = ? ORDER BY CreateDate DESC";
/*     */   public static final String SQL_TASK_ADD = "INSERT INTO T_Task_Info (TaskTitle,DueDate,ResponsibleUserId,CategoryId,TaskVisible,ReferenceUrl,ReferenceTitle,CompanyId,CreateDate,CreateUserId,ReferenceId,ReferenceType,FinishFlag) VALUES (?,?,?,?,?,?,?,?,NOW(),?,?,?,0)";
/*     */   public static final String SQL_TASK_DELETE = "DELETE FROM T_Task_Info WHERE ReferenceId = ? AND (ReferenceType = 1 OR ReferenceType = 2)";
/*     */   public static final String SQL_TASK_CATEGORY_LIST = "SELECT TaskCategoryId,TaskCategoryName,Color FROM T_Task_Category_Info WHERE CompanyId = ? ORDER BY OrderNum ASC ";
/*     */   public static final String SQL_TASK_CATEGORY_DELETE = "DELETE FROM T_Task_Category_Info WHERE TaskCategoryId = ?";
/*     */   public static final String SQL_TASK_CATEGORY_UPDATE = "UPDATE T_Task_Category_Info SET TaskCategoryName = ?, Color = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE TaskCategoryId = ?";
/*     */   public static final String SQL_TASK_CATEGORY_UPDATECOLOR = "UPDATE T_Task_Category_Info SET Color = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE TaskCategoryId = ?";
/*     */   public static final String SQL_TASK_CATEGORY_UPDATEORDER = "UPDATE T_Task_Category_Info SET OrderNum = ? , UpdateDate = NOW(), UpdateUserId = ? WHERE TaskCategoryId = ?";
/*     */   public static final String SQL_TASK_CATEGORY_ADD = "INSERT INTO T_Task_Category_Info (TaskCategoryName, CompanyId, CreateDate, CreateUserId) VALUES (?, ?, NOW(), ?)";
/*     */   public static final String SQL_TASK_LIST = "SELECT * FROM T_Task_Info WHERE CompanyId = ? ";
/*     */   public static final String SQL_TASK_LIST_MY = "SELECT TaskId,TaskTitle,DueDate,CategoryId FROM T_Task_Info WHERE FinishFlag = 0 AND ResponsibleUserId = ? ORDER BY DueDate ASC";
/*     */   public static final String SQL_TASK_DETAIL = "SELECT ReferenceId, ReferenceType, ReferenceTitle, TaskTitle, CompanyId FROM T_Task_Info WHERE TaskId = ?";
/*     */   public static final String SQL_TASK_DETAIL2 = "SELECT TaskTitle, DueDate, ReferenceId, ResponsibleUserId, CategoryId, TaskVisible FROM T_Task_Info WHERE TaskId = ?";
/*     */   public static final String SQL_TASK_DELETE2 = "DELETE FROM T_Task_Info WHERE TaskId = ? AND (TaskVisible = 1 OR (TaskVisible = 0 AND (ResponsibleUserId = ? OR CreateUserId = ?)))";
/*     */   public static final String SQL_TASK_UPDATE_DUEDATE = "UPDATE T_Task_Info SET DueDate = ? WHERE TaskId = ? AND (TaskVisible = 1 OR (TaskVisible = 0 AND (ResponsibleUserId = ? OR CreateUserId = ?)))";
/*     */   public static final String SQL_TASK_UPDATE = "UPDATE T_Task_Info SET TaskTitle = ?, DueDate = ?, ResponsibleUserId = ?, CategoryId = ?, TaskVisible = ? WHERE TaskId = ? AND (TaskVisible = 1 OR (TaskVisible = 0 AND (ResponsibleUserId = ? OR CreateUserId = ?)))";
/*     */   public static final String SQL_TASK_CHANGE_STATUS = "UPDATE T_Task_Info SET FinishFlag = ?, UpdateDate = NOW() WHERE TaskId = ? AND (TaskVisible = 1 OR (TaskVisible = 0 AND (ResponsibleUserId = ? OR CreateUserId = ?)))";
/*     */   public static final String SQL_USER_LOGIN = "SELECT A.CompanyId, A.Pwd, B.CompanyName, B.IsValid FROM T_User_Info AS A LEFT JOIN T_Company_Info AS B ON A.CompanyId = B.CompanyId WHERE A.UserId = ?";
/*     */   public static final String SQL_USER_LOGINNUM = "SELECT LoginNum FROM T_User_Info WHERE UserId = ?";
/*     */   public static final String SQL_USER_COMPANY = "SELECT A.CompanyId, B.CompanyName FROM T_User_Info AS A LEFT JOIN T_Company_Info AS B ON A.CompanyId = B.CompanyId WHERE A.UserId = ?";
/*     */   public static final String SQL_USER_LOGIN_SESSIONKEY = "SELECT CompanyId, UserId FROM T_User_Info WHERE SessionKey = ?";
/*     */   public static final String SQL_USER_USERID = "SELECT UserId FROM T_User_Info WHERE UserId = ?";
/*     */   public static final String SQL_USER_COUNT = "SELECT COUNT(*) FROM T_User_Info";
/*     */   public static final String SQL_USER_UPDATE_SESSIONKEY = "UPDATE T_User_Info SET LastLoginDate = NOW(), LoginNum = LoginNum + 1, LastLoginIP = ?, SessionKey = ? WHERE UserId = ?";
/*     */   public static final String SQL_USER_UPDATE_LOGIN = "UPDATE T_User_Info SET LastLoginDate = NOW(), LoginNum = LoginNum + 1, LastLoginIP = ? WHERE UserId = ?";
/*     */   public static final String SQL_USER_UPDATE_LOGIN_NUM = "UPDATE T_User_Info SET LoginNum = LoginNum + 1 WHERE UserId = ?";
/*     */   public static final String SQL_COMPANY_USERS = "SELECT A.UserId,A.Name,A.Sex,A.HireDate,A.IdCard,A.Mobile,A.QQ,A.Email,A.IsAdmin,A.IsCreater,A.OperationFlag,A.ImgPath,A.GroupId,A.IsGroupAdmin,B.ParentGroupId FROM T_User_Info AS A LEFT JOIN T_Company_Group_Info AS B ON A.GroupId = B.GroupId WHERE A.CompanyId = ? ORDER BY A.GroupId ASC, A.IsGroupAdmin DESC, CONVERT(A.Name USING GBK) DESC ";
/*     */   public static final String SQL_COMPANY_COMPANYID = "SELECT CompanyId FROM T_Company_Info WHERE CompanyName = ?";
/*     */   public static final String SQL_COMPANY_COMPANYNAME = "SELECT CompanyName FROM T_Company_Info WHERE CompanyId = ?";
/*     */   public static final String SQL_COMPANY_CREATEDATE = "SELECT CreateDate FROM T_Company_Info WHERE CompanyId = ?";
/*     */   public static final String SQL_COMPANY_GROUP_USERS = "SELECT A.UserId,A.Name,A.Sex,A.HireDate,A.IdCard,A.Mobile,A.QQ,A.Email,A.IsAdmin,A.IsCreater,A.OperationFlag,A.ImgPath,A.GroupId,A.IsGroupAdmin,B.ParentGroupId FROM T_User_Info AS A LEFT JOIN T_Company_Group_Info AS B ON A.GroupId = B.GroupId WHERE A.CompanyId = ? AND A.GroupId = ? ORDER BY A.IsGroupAdmin DESC, CONVERT(A.Name USING GBK) DESC ";
/*     */   public static final String SQL_COMPANY_GROUP_USERS2 = "SELECT A.UserId,A.Name,A.Sex,A.HireDate,A.IdCard,A.Mobile,A.QQ,A.Email,A.IsAdmin,A.IsCreater,A.OperationFlag,A.ImgPath,A.GroupId,A.IsGroupAdmin,B.ParentGroupId FROM T_User_Info AS A LEFT JOIN T_Company_Group_Info AS B ON A.GroupId = B.GroupId WHERE A.CompanyId = ? AND A.GroupId IN ( ";
/*     */   public static final String SQL_COMPANY_USER = "SELECT UserId,Name,Sex,HireDate,IdCard,Mobile,QQ,Email,IsAdmin,IsCreater,OperationFlag,ImgPath,GroupId,IsGroupAdmin FROM T_User_Info WHERE UserId = ? ";
/*     */   public static final String SQL_GROUP_LIST = "SELECT GroupId,GroupName,ParentGroupId FROM T_Company_Group_Info WHERE CompanyId = ? ORDER BY ParentGroupId, GroupId ASC";
/*     */   public static final String SQL_GROUP_DETAIL = "SELECT GroupId,GroupName,ParentGroupId FROM T_Company_Group_Info WHERE GroupId = ? ";
/*     */   public static final String SQL_GROUP_LIST_CHILDREN = "SELECT GroupId FROM T_Company_Group_Info WHERE ParentGroupId = ? ";
/*     */   public static final String SQL_GROUP_ADD = "INSERT INTO T_Company_Group_Info (CompanyId, GroupName, ParentGroupId, CreateDate, UpdateDate, CreateUserId, UpdateUserId) values (?, ?, ?, NOW(), NOW(),?, ?) ";
/*     */   public static final String SQL_GROUP_NAME = "SELECT GroupId FROM T_Company_Group_Info WHERE CompanyId = ? AND ParentGroupId = ? AND GroupName = ?";
/*     */   public static final String SQL_GROUP_NAME2 = "SELECT GroupId FROM T_Company_Group_Info WHERE CompanyId = ? AND GroupName = ? AND GroupId <> ?";
/*     */   public static final String SQL_GROUP_UPDATE = "UPDATE T_Company_Group_Info SET GroupName = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE GroupId = ?";
/*     */   public static final String SQL_GROUP_DELETE = "DELETE FROM T_Company_Group_Info WHERE GroupId = ?";
/*     */   public static final String SQL_GROUP_DELETE_BY_PARENTID = "DELETE FROM T_Company_Group_Info WHERE ParentGroupId = ?";
/*     */   public static final String SQL_USER_GROUP_DELETE = "UPDATE T_User_Info SET GroupId = 0, IsGroupAdmin = 0 WHERE GroupId = ?";
/*     */   public static final String SQL_DEAL_ADD = "INSERT INTO T_Deal_Info (Name,Note,CategoryId,ResponsibleUserId,DealVisible,PermissionsId,Price,Commission,CompanyId,DealStatus,CustomerId,CreateUserId,UpdateUserId,CreateDate,UpdateDate,DealStatusChangeDate) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,NOW(),NOW(),NOW())";
/*     */   public static final String SQL_DEAL_EXT_ADD = "INSERT INTO T_Deal_Ext_Info (CompanyId,DealId,Type,Info1,Info2,Info3,Info4,CreateDate) VALUES (?,?,?,?,?,?,?,NOW())";
/*     */   public static final String SQL_DEAL_EXT_DELETE = "DELETE FROM T_Deal_Ext_Info WHERE DealExtId = ?";
/*     */   public static final String SQL_CUSTOMER_DEAL_ADD = "INSERT INTO T_Customer_Deal_Info (DealId,CustomerId,CustomerName,CustomerType,PrimaryFlag,CompanyId,CreateDate) VALUES (?,?,?,?,?,?,NOW())";
/*     */   public static final String SQL_CUSTOMER_DEAL_DELETE = "DELETE FROM T_Customer_Deal_Info WHERE DealId = ? AND CustomerId = ? ";
/*     */   public static final String SQL_CUSTOMER_DEAL_DELETE2 = "DELETE FROM T_Customer_Deal_Info WHERE CustomerId = ? ";
/*     */   public static final String SQL_DEAL_UPDATE = "UPDATE T_Deal_Info SET Name = ?, Note = ?, CategoryId = ?, ResponsibleUserId = ?, Price = ?, Commission = ?, CustomerId = ?, UpdateUserId = ?, UpdateDate = NOW() WHERE DealId = ?";
/*     */   public static final String SQL_DEAL_EXT_UPDATE = "UPDATE T_Deal_Ext_Info SET Info1 = ?, Info2 = ?, Info3 = ?, Info4 = ? WHERE DealExtId = ?";
/*     */   public static final String SQL_DEAL_LASTCONTACT_UPDATE = "UPDATE T_Deal_Info SET LastContactDate = ?, UpdateDate = NOW() WHERE DealId = ?";
/*     */   public static final String SQL_DEAL_CUSTOMER_LASTCONTACT_UPDATE = "UPDATE T_Customer_Info SET LastContactDate = ?, UpdateDate = NOW() WHERE CustomerId IN (SELECT CustomerId FROM T_Customer_Deal_Info WHERE DealId = ?)";
/*     */   public static final String SQL_DEAL_DELETE = "DELETE FROM T_Deal_Info WHERE DealId = ?";
/*     */   public static final String SQL_DEAL_DELETE2 = "DELETE FROM T_Deal_Info WHERE CustomerId = ?";
/*     */   public static final String SQL_CUSTOMER_DEAL_DELETEALL = "DELETE FROM T_Customer_Deal_Info WHERE DealId = ?";
/*     */   public static final String SQL_DEAL_NOTE_DELETE = "DELETE FROM T_Note_Info WHERE DealId = ?";
/*     */   public static final String SQL_DEAL_TASK_DELETE = "DELETE FROM T_Task_Info WHERE ReferenceId = ? AND ReferenceType = 3";
/*     */   public static final String SQL_CUSTOMER_DEAL_UPDATE = "UPDATE T_Customer_Deal_Info SET CustomerId = ?, CustomerName = ?, CustomerType = ? WHERE DealId = ? AND PrimaryFlag = 1";
/*     */   public static final String SQL_DEAL_NOTE_UPDATE = "UPDATE T_Deal_Info SET Note = ?, UpdateUserId = ?, UpdateDate = NOW() WHERE DealId = ?";
/*     */   public static final String SQL_DEAL_STATUS_UPDATE = "UPDATE T_Deal_Info SET DealStatus = ?, UpdateUserId = ?, UpdateDate = NOW(),DealStatusChangeDate = NOW() WHERE DealId = ?";
/*     */   public static final String SQL_DEAL_LOG_ADD = "INSERT INTO T_Deal_Log_Info (DealId,UserName,CompanyId,OperatoinType,CreateDate) VALUES (?,?,?,?,?,?,NOW())";
/*     */   public static final String SQL_DEAL_CATEGORY_LIST = "SELECT DealCategoryId,DealCategoryName,Color FROM T_Deal_Category_Info WHERE CompanyId = ? ORDER BY OrderNum ASC";
/*     */   public static final String SQL_DEAL_CATEGORY_DELETE = "DELETE FROM T_Deal_Category_Info WHERE DealCategoryId = ?";
/*     */   public static final String SQL_DEAL_CATEGORY_UPDATE = "UPDATE T_Deal_Category_Info SET DealCategoryName = ?, Color = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE DealCategoryId = ?";
/*     */   public static final String SQL_DEAL_CATEGORY_UPDATECOLOR = "UPDATE T_Deal_Category_Info SET Color = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE DealCategoryId = ?";
/*     */   public static final String SQL_DEAL_CATEGORY_UPDATEORDER = "UPDATE T_Deal_Category_Info SET OrderNum = ? , UpdateDate = NOW(), UpdateUserId = ? WHERE DealCategoryId = ?";
/*     */   public static final String SQL_DEAL_CATEGORY_ADD = "INSERT INTO T_Deal_Category_Info (DealCategoryName, CompanyId, CreateDate, CreateUserId) VALUES (?, ?, NOW(), ?)";
/*     */   public static final String SQL_DEAL_DETAIL = "SELECT A.DealId, A.Name, A.Note, A.CategoryId, A.ResponsibleUserId, A.Price, A.Commission, A.DealStatus, A.CustomerId, A.LastContactDate, A.CreateDate, A.UpdateDate, A.DealStatusChangeDate, A.CreateUserId, A.UpdateUserId, B.Name AS CustomerName, B.Type AS CustomerType FROM T_Deal_Info AS A LEFT JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND A.DealId = ? ";
/*     */   public static final String SQL_DEAL_EXT = "SELECT * FROM T_Deal_Ext_Info WHERE DealId = ? ORDER BY Type ASC";
/*     */   public static final String SQL_DEAL_DETAIL_NOTE = "SELECT A.DealId, A.Name, A.Note, A.PermissionsId, A.CreateUserId, A.DealVisible, A.CustomerId, A.Mandatory, B.Name AS CustomerName FROM T_Deal_Info AS A LEFT JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND A.DealId = ? ";
/*     */   public static final String SQL_DEAL_PENDING_NUM = "SELECT COUNT(*) FROM T_Deal_Info AS A INNER JOIN T_Customer_Deal_Info AS B ON A.DealId = B.DealId WHERE A.DealStatus = ? AND A.CompanyId = ? ";
/*     */   public static final String SQL_DEAL_LIST_ALL = "SELECT A.DealId, A.Name, A.Price, A.Commission, A.DealStatus, A.Note, A.ResponsibleUserId, A.CreateUserId, A.CustomerId, A.CategoryId, A.CreateDate, A.LastContactDate, B.Name AS CustomerName, B.Type AS CustomerType FROM T_Deal_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND A.CompanyId = ? ";
/*     */   public static final String SQL_DEAL_EXPORT = "SELECT A.DealId, A.Name, C.Name AS ParentName, A.Price, A.Commission, A.DealStatus, A.Note, A.ResponsibleUserId, A.CreateUserId, A.CategoryId, A.CreateDate, A.DealStatusChangeDate, B.CustomerId, B.Name AS CustomerName FROM T_Deal_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId LEFT JOIN T_Customer_Info AS C ON B.ParentCustomerId = C.CustomerId WHERE B.DeleteFlag = 0 AND A.CompanyId = ? ";
/*     */   public static final String SQL_CUSTOMER_DEAL_COUNT = "SELECT COUNT(*) AS DealNums, DealStatus FROM T_Deal_Info WHERE ResponsibleUserId = ? GROUP BY DealStatus";
/*     */   public static final String SQL_CUSTOMER_DEAL_COUNT_ALL = "SELECT COUNT(*) AS DealNums, DealStatus FROM T_Deal_Info WHERE CompanyId = ? GROUP BY DealStatus";
/*     */   public static final String SQL_DEAL_LIST_WON_COUNT = "SELECT COUNT(*) AS totalWonNum, sum(A.Price) AS totalMoney, sum(A.Commission) AS totalCommission FROM T_Deal_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND A.CompanyId = ? ";
/*     */   public static final String SQL_DEAL_LIST_ALL_COUNT = "SELECT COUNT(*) FROM T_Deal_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND A.CompanyId = ? ";
/*     */   public static final String SQL_DEAL_CUSTOMER_INFO = "SELECT A.DealId,A.CustomerId,B.Name,B.Type,A.PrimaryFlag, C.Name as ParentName, B.ParentCustomerId FROM T_Customer_Deal_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId LEFT JOIN T_Customer_Info AS C ON B.ParentCustomerId = C.CustomerId WHERE B.DeleteFlag = 0 AND (C.DeleteFlag is NULL OR C.DeleteFlag = 0) AND A.DealId = ? ORDER BY A.PrimaryFlag DESC";
/*     */   public static final String SQL_DEAL_GET_NAME = "SELECT Name FROM T_Deal_Info WHERE DealId = ?";
/*     */   public static final String SQL_COMPANY_USERSUM = "SELECT COUNT(*) FROM T_User_Info WHERE CompanyId = ? ORDER BY GroupId ASC ";
/*     */   public static final String SQL_USER_ADD = "INSERT INTO T_User_Info (UserId,CompanyId,Pwd,Name,Sex,HireDate,IdCard,Mobile,QQ,Email,ImgPath,OperationFlag,IsAdmin,IsCreater,LoginNum,CreateDate,UpdateDate,GroupId,IsGroupAdmin) VALUES (?,?,?,?,?,?,?,?,?,?,?,'0,0',0,0,0,NOW(),NOW(),?,?)";
/*     */   public static final String SQL_USER_ADD2 = "INSERT INTO T_User_Info (UserId,CompanyId,Pwd,Name,Email,QQ,Mobile,ImgPath,OperationFlag,IsAdmin,IsCreater,LoginNum,CreateDate,UpdateDate) VALUES (?,?,?,?,?,?,?,?,'1,1',1,1,0,NOW(),NOW())";
/*     */   public static final String SQL_USER_EMAIL_ADD = "INSERT INTO T_User_Email (UserId,Host,Port,UserName,UserPwd,IsSSL,EmailAddress,EmailSign,CreateDate,UpdateDate) VALUES (?,?,?,?,?,?,?,?,NOW(),NOW())";
/*     */   public static final String SQL_USER_EMAIL_UPDATE = "UPDATE T_User_Email SET Host = ?, Port = ?, UserName = ?, UserPwd = ?, IsSSL = ?, EmailAddress = ?, EmailSign = ?, UpdateDate = NOW() WHERE UserId = ?";
/*     */   public static final String SQL_USER_EMAIL_DETAIL = "SELECT * FROM T_User_Email WHERE UserId = ?";
/*     */   public static final String SQL_USER_VOIP_ADD = "INSERT INTO T_User_VOIP (UserId,UserName,UserPwd,VOIPType,CompanyId,CreateDate,UpdateDate) VALUES (?,?,?,?,?,NOW(),NOW())";
/*     */   public static final String SQL_USER_VOIP_UPDATE = "UPDATE T_User_VOIP SET UserName = ?, UserPwd = ?, VOIPType = ?, UpdateDate = NOW() WHERE UserId = ?";
/*     */   public static final String SQL_USER_VOIP_CLEAR = "DELETE FROM T_User_VOIP WHERE CompanyId = ? AND UserId = ?";
/*     */   public static final String SQL_USER_VOIP_DETAIL = "SELECT * FROM T_User_VOIP WHERE UserId = ?";
/*     */   public static final String SQL_USER_VOIP_ADMIN_DETAIL = "SELECT * FROM T_User_VOIP WHERE UserName like '8000%'";
/*     */   public static final String SQL_USER_VOIP_LIST = "SELECT UserId, UserName FROM T_User_VOIP WHERE CompanyId = ?";
/*     */   public static final String SQL_USER_VOIP_LIST2 = "SELECT A.UserName, B.GroupId, B.Name, C.GroupName FROM T_User_VOIP AS A INNER JOIN T_User_Info AS B ON A.UserId = B.UserId LEFT JOIN T_Company_Group_Info AS C ON B.GroupId = C.GroupId WHERE A.CompanyId = ?";
/*     */   public static final String SQL_USER_VOIP_LIST3 = "SELECT A.UserId, A.UserName, A.UserPwd, A.VOIPType, B.GroupId, B.Name FROM T_User_VOIP AS A INNER JOIN T_User_Info AS B ON A.UserId = B.UserId WHERE A.CompanyId = ?";
/*     */   public static final String SQL_CUSTOMER_FIELD_LIST_ALL = "SELECT CustomerFieldId, CustomerFieldName, FieldType, ValueType, InitValue FROM T_Customer_Field WHERE CompanyId = ?  ORDER BY OrderNum ASC";
/*     */   public static final String SQL_CUSTOMER_FIELD_LIST = "SELECT CustomerFieldId, CustomerFieldName, FieldType, ValueType, InitValue FROM T_Customer_Field WHERE CompanyId = ?  AND (FieldType = ? OR FieldType = ?) ORDER BY OrderNum ASC";
/*     */   public static final String SQL_CUSTOMER_FIELD_LIST_ALL_MIN = "SELECT CustomerFieldId, CustomerFieldName,ValueType,FieldType FROM T_Customer_Field WHERE CompanyId = ? ORDER BY OrderNum ASC";
/*     */   public static final String SQL_CUSTOMER_FIELD_ADD = "INSERT INTO T_Customer_Field (CustomerFieldName, FieldType, ValueType, InitValue, CompanyId, CreateDate, CreateUserId) values (?, ?, ?, ?, ?, NOW(), ?)";
/*     */   public static final String SQL_CUSTOMER_FIELD_UPDATE = "UPDATE T_Customer_Field SET CustomerFieldName = ? , FieldType = ?, ValueType = ?, InitValue = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE CustomerFieldId = ?";
/*     */   public static final String SQL_CUSTOMER_FIELD_UPDATEORDER = "UPDATE T_Customer_Field SET OrderNum = ? , UpdateDate = NOW(), UpdateUserId = ? WHERE CustomerFieldId = ?";
/*     */   public static final String SQL_CUSTOMER_FIELD_DELETE = "DELETE FROM T_Customer_Field WHERE CustomerFieldId = ?";
/*     */   public static final String SQL_CUSTOMER_EXT_VALUE_DELETE = "DELETE FROM T_Customer_Ext_Info WHERE Type = ?";
/*     */   public static final String SQL_DEAL_FIELD_LIST_ALL = "SELECT DealFieldId, DealFieldName, ValueType, InitValue, Mandatory FROM T_Deal_Field WHERE CompanyId = ?  ORDER BY OrderNum ASC";
/*     */   public static final String SQL_DEAL_FIELD_ADD = "INSERT INTO T_Deal_Field (DealFieldName, ValueType, InitValue, Mandatory, CompanyId, CreateDate, CreateUserId) values (?, ?, ?, ?, ?, NOW(), ?)";
/*     */   public static final String SQL_DEAL_FIELD_UPDATE = "UPDATE T_Deal_Field SET DealFieldName = ? , ValueType = ?, InitValue = ?, Mandatory = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE DealFieldId = ?";
/*     */   public static final String SQL_DEAL_FIELD_DELETE = "DELETE FROM T_Deal_Field WHERE DealFieldId = ?";
/*     */   public static final String SQL_DEAL_EXT_VALUE_DELETE = "DELETE FROM T_Deal_Ext_Info WHERE Type = ?";
/*     */   public static final String SQL_DEAL_FIELD_UPDATEORDER = "UPDATE T_Deal_Field SET OrderNum = ? , UpdateDate = NOW(), UpdateUserId = ? WHERE DealFieldId = ?";
/*     */   public static final String SQL_IMPORT_ADD = "INSERT INTO T_Import_Info (ImportType, FileName, CompanyId, CreateDate, CreateUserId) values (?, ?, ?, NOW(), ?)";
/*     */   public static final String SQL_IMPORT_DELETE_ADMIN = "DELETE FROM T_Import_Info WHERE CompanyId = ? AND ImportId = ?";
/*     */   public static final String SQL_IMPORT_DELETE = "DELETE FROM T_Import_Info WHERE CompanyId = ? AND ImportId = ? AND CreateUserId = ? ";
/*     */   public static final String SQL_SEARCHNAME_CUSTOMER = "SELECT CustomerId AS id, LastContactDate, Type, PermissionsId as ShowUserId, Name as label, Name as value FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND Name like ?";
/*     */   public static final String SQL_SEARCHNAME_CUSTOMER_APP = "SELECT CustomerId, Type, Name FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND Name like ?";
/*     */   public static final String SQL_SEARCHNAME_DEAL = "SELECT A.DealId AS id, A.LastContactDate, 3, ResponsibleUserId AS ShowUserId, A.Name AS label, A.Name AS value FROM T_Deal_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND A.CompanyId = ? AND A.Name like ?";
/*     */   public static final String SQL_COMPANY_ADD = "INSERT INTO T_Company_Info (CompanyName, IsValid, LicenceNum, CreateDate, UpdateDate) VALUES (?, 1, 0, NOW(), NOW())";
/*     */   public static final String SQL_COMPANY_DETAIL_ADD = "INSERT INTO T_Company_Info (CompanyName, IsValid, LicenceNum, Category, CreateDate, UpdateDate) VALUES (?, ?, ?, ?, NOW(), NOW())";
/*     */   public static final String SQL_COMPANY_EXT_ADD = "INSERT INTO T_Company_Ext_Info (CompanyId, FieldType, FieldValue, CreateDate, CreateUserId) VALUES (?, ?, ?, NOW(), ?)";
/*     */   public static final String SQL_COMPANY_EXT_UPDATE = "UPDATE T_Company_Ext_Info SET FieldValue = ?, UpdateUserId = ?, UpdateDate = NOW() WHERE CompanyId = ? AND FieldType = ?";
/*     */   public static final String SQL_COMPANY_EXT_GET = "SELECT FieldValue FROM T_Company_Ext_Info WHERE CompanyId = ? AND FieldType = ?";
/*     */   public static final String SQL_COMPANY_EXT_MAXNOTCONTACTDAYS_ALL = "SELECT CompanyId, FieldValue FROM T_Company_Ext_Info WHERE FieldType = ?";
/*     */   public static final String SQL_COMPANY_OPEN = "UPDATE T_Company_Info SET IsValid = 1, UpdateDate = NOW() WHERE CompanyId = ?";
/*     */   public static final String SQL_COMPANY_CLOSE = "UPDATE T_Company_Info SET IsValid = 0, UpdateDate = NOW() WHERE CompanyId = ?";
/*     */   public static final String SQL_CUSTOMER_CATEGORY_ADD = "INSERT INTO T_Customer_Category (CategoryName, CategoryType, CompanyId, CreateDate, CreateUserId, OrderNum) values (?, ?, ?, NOW(), ?, 0)";
/*     */   public static final String SQL_CUSTOMER_CATEGORY_UPDATE = "UPDATE T_Customer_Category SET CategoryName = ? , Color = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE CategoryId = ?";
/*     */   public static final String SQL_CUSTOMER_CATEGORY_UPDATECOLOR = "UPDATE T_Customer_Category SET Color = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE CategoryId = ?";
/*     */   public static final String SQL_CUSTOMER_CATEGORY_UPDATEORDER = "UPDATE T_Customer_Category SET OrderNum = ? , UpdateDate = NOW(), UpdateUserId = ? WHERE CategoryId = ?";
/*     */   public static final String SQL_CUSTOMER_CATEGORY_DELETE = "DELETE FROM T_Customer_Category WHERE CategoryId = ?";
/*     */   public static final String SQL_CUSTOMER_CATEGORY_LIST = "SELECT CategoryId, CategoryName,Color FROM T_Customer_Category WHERE CompanyId = ? AND CategoryType = ? ORDER BY OrderNum ASC";
/*     */   public static final String SQL_COMPANY_SMS_DETAIL = "SELECT * FROM T_Company_SMS_Info WHERE CompanyId = ?";
/*     */   public static final String SQL_COMPANY_ACCESS_DETAIL = "SELECT * FROM T_Company_Access_Info WHERE CompanyId = ?";
/*     */   public static final String SQL_COMPANY_ACCESS_DETAIL_ALL = "SELECT * FROM T_Company_Access_Info";
/*     */   public static final String SQL_COMPANY_SMS_ADD = "INSERT INTO T_Company_SMS_Info (CompanyId,SerialNumber,SerialPassword,SpNumber,Signature,CreateDate,UpdateDate) VALUES (?,?,?,?,?,NOW(),NOW())";
/*     */   public static final String SQL_COMPANY_ACCESS_ADD = "INSERT INTO T_Company_Access_Info (CompanyId,AccessId,AccessPwd,CreateDate,UpdateDate) VALUES (?,?,?,NOW(),NOW()) ON DUPLICATE KEY UPDATE AccessId = ?, AccessPwd = ?, UpdateDate = NOW()";
/*     */   public static final String SQL_COMPANY_ACCESS_UPDATE = "UPDATE T_Company_Access_Info SET AccessId = ?, AccessPwd = ?, UpdateDate = NOW() WHERE CompanyId = ?";
/*     */   public static final String SQL_COMPANY_SMS_UPDATE = "UPDATE T_Company_SMS_Info SET SerialNumber = ?, SerialPassword = ?, SpNumber = ?, Signature = ?, UpdateDate = NOW() WHERE CompanyId = ?";
/*     */   public static final String SQL_NOTE_DEFAULT_WORD_LIST = "SELECT DefaultWordId,DefaultWord FROM T_Note_Default_Word WHERE CompanyId = ? ORDER BY OrderNum ASC";
/*     */   public static final String SQL_NOTE_DEFAULT_WORD_ADD = "INSERT INTO T_Note_Default_Word (CompanyId, DefaultWord, CreateDate, UpdateDate, CreateUserId, UpdateUserId) values (?, ?, NOW(), NOW(),?, ?) ";
/*     */   public static final String SQL_NOTE_DEFAULT_WORD_UPDATE = "UPDATE T_Note_Default_Word SET DefaultWord = ?, UpdateDate = NOW(), UpdateUserId = ? WHERE DefaultWordId = ?";
/*     */   public static final String SQL_NOTE_DEFAULT_WORD_UPDATEORDER = "UPDATE T_Note_Default_Word SET OrderNum = ? , UpdateDate = NOW(), UpdateUserId = ? WHERE DefaultWordId = ?";
/*     */   public static final String SQL_NOTE_DEFAULT_WORD_DELETE = "DELETE FROM T_Note_Default_Word WHERE DefaultWordId = ?";
/*     */   public static final String SQL_MERGE_CUSTOMERINFO = "UPDATE T_Customer_Info SET ParentCustomerId = ? WHERE ParentCustomerId = ?";
/*     */   public static final String SQL_MERGE_CUSTOMEREXT = "UPDATE T_Customer_Ext_Info SET CustomerId = ? WHERE CustomerId = ?";
/*     */   public static final String SQL_MERGE_NOTE = "UPDATE T_Note_Info SET SubjectId = ? WHERE SubjectId = ? AND SubjectType = ?";
/*     */   public static final String SQL_MERGE_DEAL = "UPDATE T_Deal_Info SET CustomerId = ? WHERE CustomerId = ?";
/*     */   public static final String SQL_MERGE_DEAL2 = "UPDATE T_Customer_Deal_Info SET CustomerId = ? WHERE CustomerId = ?";
/*     */   public static final String SQL_MERGE_TAG = "UPDATE T_Customer_Tag_Info SET CustomerId = ? WHERE CustomerId = ?";
/*     */   public static final String SQL_MERGE_SMS = "UPDATE T_Company_SMS_Msg_Info SET CustomerId = ? WHERE CustomerId = ?";
/*     */   public static final String SQL_MERGE_SMS2 = "UPDATE T_Company_SMS_Msg_Info SET ParentCustomerId = ? WHERE ParentCustomerId = ?";
/*     */   public static final String SQL_MERGE_ImportantDate = "UPDATE T_ImportantDate_Info SET CustomerId = ? WHERE CustomerId = ?";
/*     */   public static final String SQL_TOTAL_CREATECUSTOMERS = "SELECT COUNT(*) AS Nums, DATEDIFF(NOW(),CreateDate) AS diffdate FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND (Type = ? OR (Type = ? AND ParentCustomerId = -1))";
/*     */   public static final String SQL_TOTAL_LASTCONTACTCUSTOMERS = "SELECT COUNT(*) AS Nums, DATEDIFF(NOW(),LastContactDate) AS diffdate FROM T_Customer_Info WHERE DeleteFlag = 0 AND LastContactDate IS NOT NULL AND CompanyId = ? AND (Type = ? OR (Type = ? AND ParentCustomerId = -1))";
/*     */   public static final String SQL_TOTAL_CUSTOMERS = "SELECT COUNT(*) AS totalNum, PermissionsId FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND Visible = ? AND (Type = ?  OR (Type = ? AND ParentCustomerId = ?)) ";
/*     */   public static final String SQL_TOTAL_CUSTOMERS2 = "SELECT COUNT(*) AS totalNum FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND (Type = ? OR (Type = ? AND ParentCustomerId = -1))";
/*     */   public static final String SQL_TOTAL_NOTCONTACTEDCUSTOMERNUMS = "SELECT COUNT(*) AS totalNum FROM T_Customer_Info WHERE DeleteFlag = 0 AND LastContactDate is null AND CompanyId = ? AND (Type = ? OR (Type = ? AND ParentCustomerId = -1))";
/*     */   public static final String SQL_TOTAL_CONTACTEDCUSTOMERNUMS = "SELECT COUNT(*) AS totalNum FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND (Type = ? OR (Type = ? AND ParentCustomerId = -1))";
/*     */   public static final String SQL_TOTAL_NEXTCONTACTEDCUSTOMERNUMS = "SELECT COUNT(*) AS totalNum FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? ";
/*     */   public static final String SQL_TOTAL_CUSTOMERNUMS_CATEGORY = "SELECT COUNT(*) AS totalNum, CategoryId FROM T_Customer_Info WHERE DeleteFlag = 0 AND CompanyId = ? AND (Type = ? OR (Type = ? AND ParentCustomerId = -1))";
/*     */   public static final String SQL_TOTAL_CUSTOMERNUMS_CATEGORY_CHANGE = "SELECT COUNT(DISTINCT(A.CustomerId)) AS totalNum, A.CategoryId FROM T_Customer_Category_Change_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId AND A.CategoryId = B.CategoryId WHERE B.DeleteFlag = 0 AND B.CompanyId = ? AND (B.Type = ? OR (B.Type = ? AND ParentCustomerId = -1))";
/*     */   public static final String SQL_TOTAL_CUSTOMERNUMS_CATEGORY_CHANGE2 = "SELECT COUNT(DISTINCT(A.CustomerId)) AS totalNum, B.PermissionsId FROM T_Customer_Category_Change_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId AND A.CategoryId = B.CategoryId WHERE B.DeleteFlag = 0 AND B.CompanyId = ? AND (B.Type = ? OR (B.Type = ? AND ParentCustomerId = -1))";
/*     */   public static final String SQL_TOTAL_CUSTOMERNUMS_TAG = "SELECT COUNT(*) AS totalNum, A.TagId FROM T_Customer_Tag_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND B.CompanyId = ? AND (B.Type = ? OR (B.Type = ? AND B.ParentCustomerId = -1))";
/*     */   public static final String SQL_IMPORTANTDATE_ADD = "INSERT INTO T_ImportantDate_Info (CustomerId, ImportantDateType, ImportantDateMonth, ImportantDateDay, ImportantDateYear, CompanyId, CreateUserId, CreateDate,UpdateDate) values (?, ?, ?, ?, ?, ?, ?, NOW(), NOW()) ";
/*     */   public static final String SQL_IMPORTANTDATE_DELETE_ADMIN = "DELETE FROM T_ImportantDate_Info WHERE ImportantDateId = ? ";
/*     */   public static final String SQL_IMPORTANTDATE_DELETE = "DELETE A FROM T_ImportantDate_Info AS A LEFT JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE A.ImportantDateId = ? AND B.Visible = ? AND B.PermissionsId = ? ";
/*     */   public static final String SQL_IMPORTANTDATE_UPDATE = "UPDATE T_ImportantDate_Info SET ImportantDateType = ?, ImportantDateMonth = ?, ImportantDateDay = ?, ImportantDateYear = ?, UpdateDate = NOW(), UpdateUserId = ?, LastGenerateDate = null WHERE ImportantDateId = ?";
/*     */   public static final String SQL_IMPORTANTDATE_UPDATE_LastGenerateDate = "UPDATE T_ImportantDate_Info SET LastGenerateDate = NOW() WHERE ImportantDateId = ?";
/*     */   public static final String SQL_IMPORTANTDATE_CUSTOMER_LIST = "SELECT ImportantDateId,ImportantDateType,ImportantDateMonth,ImportantDateDay,ImportantDateYear FROM T_ImportantDate_Info WHERE CustomerId = ? ORDER BY CreateDate DESC";
/*     */   public static final String SQL_IMPORTANTDATE_LIST = "SELECT A.ImportantDateType, A.CustomerId, A.ImportantDateMonth, A.ImportantDateDay, A.ImportantDateYear, B.Type, B.Name FROM T_ImportantDate_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND B.Visible = ? AND B.PermissionsId = ? AND A.ImportantDateMonth = ? AND A.ImportantDateDay = ? AND (A.ImportantDateYear = 0 OR A.ImportantDateYear = ?) ORDER BY A.CreateDate DESC ";
/*     */   public static final String SQL_IMPORTANTDATE_LAST = "SELECT A.LastGenerateDate, A.ImportantDateId,A.ImportantDateType,B.Name,B.PermissionsId,B.Type,B.CompanyId,A.CustomerId FROM T_ImportantDate_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND A.ImportantDateMonth = ? AND A.ImportantDateDay = ? AND (A.ImportantDateYear = 0 OR A.ImportantDateYear = ?) ";
/*     */   public static final String SQL_IMPORTANTDATE_LASTCOUNT = "SELECT COUNT(*) FROM T_ImportantDate_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId WHERE B.DeleteFlag = 0 AND B.Visible = ? AND B.PermissionsId = ? AND A.ImportantDateMonth = ? AND A.ImportantDateDay = ? AND (A.ImportantDateYear = 0 OR A.ImportantDateYear = ?) ";
/*     */   public static final String SQL_IMPORTANTDATE_CUSTOMER_DELETE = "DELETE FROM T_ImportantDate_Info WHERE CustomerId = ?";
/*     */   public static final String SQL_COMPANY_BusinessArchive_COUNT = "SELECT COUNT(*) FROM T_Company_BusinessArchive WHERE CompanyName = ?";
/*     */   public static final String SQL_COMPANY_BusinessArchive_DETAIL = "SELECT * FROM T_Company_BusinessArchive WHERE CompanyName = ?";
/*     */   public static final String SQL_COMPANY_BusinessArchive_ADD = "INSERT INTO T_Company_BusinessArchive(CompanyName,Address,SN,CompanyType,Header,FoundedDate,RegisteredCapital,OperatingPeriod,RegistrationAuthority,BusinessScope,AnnualinSpectionResult,CreateDate,UpdateDate) values (?,?,?,?,?,?,?,?,?,?,?,NOW(),NOW())";
/*     */   public static final String SQL_COMPANY_BusinessArchive_UPDATE = "UPDATE T_Company_BusinessArchive SET Address = ?, SN = ?, CompanyType = ?, Header = ?, FoundedDate = ?, RegisteredCapital = ?, OperatingPeriod = ?, RegistrationAuthority = ?, BusinessScope = ?, AnnualinSpectionResult = ?, UpdateDate = NOW() WHERE CompanyName = ?";
/*     */   public static final String SQL_MESSAGE_BODY_ADD = "INSERT INTO T_Message_Body_Info (Title,Message,MessageType,AttachFiles,Visible,PermissionsId,CreateUserId,CompanyId,CreateDate,UpdateDate) VALUES (?,?,?,?,?,?,?,?,NOW(),NOW())";
/*     */   public static final String SQL_MESSAGE_BODY_UPDATE = "UPDATE T_Message_Body_Info SET Title = ?, Message = ?, AttachFiles = ?, Visible = ?, PermissionsId = ?, UpdateDate = NOW() WHERE MessageId = ?";
/*     */   public static final String SQL_MESSAGE_INFO = "SELECT * FROM T_Message_Body_Info WHERE MessageId = ?";
/*     */   public static final String SQL_MESSAGE_RELATION_UPDATE = "UPDATE T_Message_Relation_Info SET ReadFlag = 1, UpdateDate = NOW() WHERE MessageId = ? AND ReceiveUserId = ?";
/*     */   public static final String SQL_MESSAGE_RELATION_ALLUPDATE = "UPDATE T_Message_Relation_Info SET ReadFlag = 1, UpdateDate = NOW() WHERE ReadFlag = 0 AND ReceiveUserId = ?";
/*     */   public static final String SQL_MESSAGE_READ_USER = "SELECT ReceiveUserId FROM T_Message_Relation_Info WHERE ReadFlag = 1 AND MessageId = ? ";
/*     */   public static final String SQL_MESSAGE_DELETE = "DELETE FROM T_Message_Body_Info WHERE MessageId = ?";
/*     */   public static final String SQL_MESSAGE_RELATION_DELETE = "DELETE FROM T_Message_Relation_Info WHERE MessageId = ?";
/*     */   public static final String SQL_MESSAGE_RELATION_USER_DELETE = "DELETE FROM T_Message_Relation_Info WHERE MessageId = ? AND ReceiveUserId = ?";
/*     */   public static final String SQL_MESSAGE_RELATION_USER_DELETE_LOGIC = "UPDATE T_Message_Relation_Info SET ReadFlag = 2 WHERE MessageId = ? AND ReceiveUserId = ?";
/*     */   public static final String SQL_MESSAGE_LIST_ALL = "SELECT A.MessageId, B.Title, B.Message, B.CreateDate, B.CreateUserId, A.ReadFlag FROM T_Message_Relation_Info AS A INNER JOIN T_Message_Body_Info AS B ON A.MessageId = B.MessageId WHERE A.CompanyId = ? AND A.ReceiveUserId = ? ";
/*     */   public static final String SQL_MESSAGE_LIST_ALL_COUNT = "SELECT COUNT(*) FROM T_Message_Relation_Info AS A INNER JOIN T_Message_Body_Info AS B ON A.MessageId = B.MessageId WHERE A.CompanyId = ? AND A.ReceiveUserId = ? ";
/*     */   public static final String SQL_CUSTOMER_PERMISSION_MOVE_PUBLIC = "UPDATE T_Customer_Info SET PermissionsId = ?, Visible = ?, IndexFlag = 0, UpdateDate = NOW(), UpdateUserId = ? WHERE CompanyId = ? AND ((LastContactDate IS NULL AND (DATEDIFF(NOW(), AssignDate) > ?)) OR (DATEDIFF(NOW(), LastContactDate) > ?)) AND PermissionsId IN (SELECT UserId FROM T_User_Info WHERE GroupId = ? )";
/*     */   public static final String SQL_CUSTOMER_PERMISSION_MOVE_ALL_PUBLIC = "UPDATE T_Customer_Info SET PermissionsId = ?, Visible = ?, IndexFlag = 0, UpdateDate = NOW(), UpdateUserId = ? WHERE CompanyId = ? AND ((LastContactDate IS NULL AND (DATEDIFF(NOW(), AssignDate) > ?)) OR (DATEDIFF(NOW(), LastContactDate) > ?))";
/*     */   public static final String SQL_CUSTOMER_PEOPLE_DELETE = "UPDATE T_Customer_Info AS A INNER JOIN T_Customer_Info AS B ON A.ParentCustomerId = B.CustomerId AND B.DeleteFlag = 1 AND B.Type = 0 AND B.ParentCustomerId = -1 SET A.DeleteFlag = 1, A.IndexFlag = 0 WHERE A.Type = 1";
/*     */   public static final String SQL_CUSTOMER_EXTINFO_DELETE_ALL = "DELETE FROM T_Customer_Ext_Info WHERE CustomerId IN (SELECT CustomerId FROM T_Customer_Info WHERE DeleteFlag = 1)";
/*     */   public static final String SQL_CUSTOMER_TAG_DELETE_ALL = "DELETE FROM T_Customer_Tag_Info WHERE CustomerId IN (SELECT CustomerId FROM T_Customer_Info WHERE DeleteFlag = 1)";
/*     */   public static final String SQL_CUSTOMER_DEAL_DELETE_ALL = "DELETE FROM T_Deal_Info WHERE CustomerId IN (SELECT CustomerId FROM T_Customer_Info WHERE DeleteFlag = 1)";
/*     */   public static final String SQL_CUSTOMER_DEAL2_DELETE_ALL = "DELETE FROM T_Customer_Deal_Info WHERE CustomerId IN (SELECT CustomerId FROM T_Customer_Info WHERE DeleteFlag = 1)";
/*     */   public static final String SQL_CUSTOMER_IMPORTANTDATE_DELETE_ALL = "DELETE FROM T_ImportantDate_Info WHERE CustomerId IN (SELECT CustomerId FROM T_Customer_Info WHERE DeleteFlag = 1)";
/*     */   public static final String SQL_CUSTOMER_PERMISSION_CHANGE_DELETE_ALL = "DELETE FROM T_Customer_Permissions_Change_Info WHERE CustomerId IN (SELECT CustomerId FROM T_Customer_Info WHERE DeleteFlag = 1)";
/*     */   public static final String SQL_CUSTOMER_CATEGORY_CHANGE_DELETE_ALL = "DELETE FROM T_Customer_Category_Change_Info WHERE CustomerId IN (SELECT CustomerId FROM T_Customer_Info WHERE DeleteFlag = 1)";
/*     */   public static final String SQL_CUSTOMER_DELETE_ALL = "DELETE FROM T_Customer_Info WHERE DeleteFlag = 1 AND IndexFlag = 1";
/*     */   public static final String SQL_CUSTOMER_SHARE_DELETE_ALL = "DELETE FROM T_Customer_Permissions_Info WHERE CustomerId IN (SELECT CustomerId FROM T_Customer_Info WHERE DeleteFlag = 1)";
/*     */   public static final String SQL_VOIP_CALL_ADD = "INSERT INTO T_VOIP_CALL_Info (CallId, UserId, Telephone, CallType, BegingDate, EndDate, TotalTime, FileUrl, LocalFileUrl, CompanyId, CreateDate) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW()) ON DUPLICATE KEY UPDATE UserId = ? ";
/*     */   public static final String SQL_VOIP_CALL_DOWNLOADURL_LIST = "SELECT VOIPId, Telephone, FileUrl FROM T_VOIP_CALL_Info WHERE LocalFileUrl = '' LIMIT 0, 10";
/*     */   public static final String SQL_VOIP_CALL_DOWNLOADURL_UPDATE = "UPDATE T_VOIP_CALL_Info SET LocalFileUrl = ? WHERE VOIPId = ?";
/*     */   public static final String SQL_VOIP_CALL_LIST = "SELECT UserId,Telephone,BegingDate,EndDate,TotalTime,FileUrl,LocalFileUrl FROM T_VOIP_CALL_Info WHERE CompanyId = ? AND Telephone IN (";
/*     */   public static final String SQL_VOIP_CALL_TELEPHONE_TOTALNUM = "SELECT COUNT(Telephone) AS totalNum, UserId FROM T_VOIP_CALL_Info WHERE CompanyId = ? ";
/*     */   public static final String SQL_VOIP_CALL_TOTALTIME = "SELECT SUM(TotalTime) AS totalNum, UserId FROM T_VOIP_CALL_Info WHERE CompanyId = ? ";
/*     */   public static final String SQL_VOIP_CALL_LOG_ADD = "INSERT INTO T_VOIP_CALL_LOG_Info (StartDate, EndDate, Num, CompanyId, CreateDate) values (?, ?, ?, ?, NOW())";
/*     */   public static final String SQL_VOIP_CALL_LOG_MAX_ENDDATE = "SELECT MAX(EndDate) AS MAXEndDate FROM T_VOIP_CALL_LOG_Info WHERE CompanyId = ? ";
/*     */   public static final String SQL_VOIP_CALL_LIST_ALL = "SELECT UserId, Telephone, BegingDate, TotalTime, FileUrl, LocalFileUrl,CallType FROM T_VOIP_CALL_Info WHERE CompanyId = ? ";
/*     */   public static final String SQL_VOIP_CALL_LIST_ALL_COUNT = "SELECT COUNT(*) FROM T_VOIP_CALL_Info WHERE CompanyId = ? ";
/*     */   public static final String SQL_VOIP_CALL_SEARCHCUSTOMERBYTELS = "SELECT A.Info1, A.CustomerId, B.Name, B.Type, C.Name AS ParentName from T_Customer_Ext_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId LEFT JOIN T_Customer_Info AS C ON B.ParentCustomerId = C.CustomerId WHERE A.CompanyId = ? and A.Type = ? And A.Info1 IN ( ";
/*     */   public static final String SQL_VOIP_CALL_SEARCHCUSTOMERBYTEL = "SELECT A.Info1, A.CustomerId, B.Name, B.Type, C.Name AS ParentName from T_Customer_Ext_Info AS A INNER JOIN T_Customer_Info AS B ON A.CustomerId = B.CustomerId LEFT JOIN T_Customer_Info AS C ON B.ParentCustomerId = C.CustomerId WHERE A.CompanyId = ? and A.Type = ? And A.Info1 = ? ";
/*     */   public static final String SQL_VOIP_URL = "http://voip.qikebao.com/action?callback=jQuery1102031366848526522517_";
/*     */   public static final String SQL_VOIP_UCPAAS_URL = "http://ucpaas.qikebao.com/callrecord?";
/*     */   public static final String SQL_VOIP_REPORT_URL = "http://app.7moor.com/action?callback=jQuery17207710306676232772_";
/*     */   public static final String SQL_VOIP_BOX_URL = "http://box.qikebao.com/chart";
/*     */   public static final String SQL_EXPORT_TASK_ADD = "INSERT INTO T_ExportTask_Info (StartDate, Subject, TotalNum, UserObject,CustomerSearchConditionObject,FilePath,CompanyId,UserId,IsFinish,ExportNum) VALUES (NOW(), ?,?,?,?,?,?,?,0,0)";
/*     */   public static final String SQL_EXPORT_TASK_UPDATE = "UPDATE T_ExportTask_Info SET ExportNum = ? WHERE ExportTaskId = ?";
/*     */   public static final String SQL_EXPORT_TASK_FINISH = "UPDATE T_ExportTask_Info SET ExportNum = ?, EndDate = NOW(), IsFinish = 1 WHERE ExportTaskId = ?";
/*     */   public static final String SQL_EXPORT_TASK_DELETE = "DELETE FROM T_ExportTask_Info WHERE ExportTaskId = ? AND IsFinish = 0 AND UserId = ?";
/*     */   public static final String SQL_EXPORT_TASK_LIST = "SELECT ExportTaskId,StartDate,Subject,TotalNum,ExportNum,FilePath,IsFinish FROM T_ExportTask_Info WHERE CompanyId = ? AND UserId = ? ORDER BY ExportTaskId DESC ";
/*     */   public static final String SQL_EXPORT_TASK_COUNT = "SELECT COUNT(*) FROM T_ExportTask_Info WHERE CompanyId = ? AND UserId = ?";
/*     */   public static final String SQL_YUNSOU_HISTORY_LIST = "SELECT KeyWord, CurrentPage, SearchDate FROM T_Yunsou_History WHERE CompanyId = ? AND UserId = ? ORDER BY SearchDate DESC";
/*     */   public static final String SQL_YUNSOU_HISTORY_REMOVE = "DELETE FROM T_Yunsou_History WHERE CompanyId = ? AND UserId = ? ORDER BY SearchDate ASC LIMIT ";
/*     */   public static final String SQL_YUNSOU_HISTORY_UPDATE = "UPDATE T_Yunsou_History SET CurrentPage = ?, SearchDate = NOW() WHERE KeyWord = ? AND CompanyId = ? AND UserId = ?";
/*     */   public static final String SQL_YUNSOU_HISTORY_ADD = "INSERT INTO T_Yunsou_History (KeyWord, CurrentPage, SearchDate, CompanyId, UserId) VALUES (?,?,NOW(),?,?) ON DUPLICATE KEY UPDATE CurrentPage = ?, SearchDate = NOW()";
/*     */   public static final String CUSTOMER_INFO_KEY_COMPANYNAME = "companyName";
/*     */   public static final String CUSTOMER_INFO_KEY_NAME = "name";
/*     */   public static final String CUSTOMER_INFO_KEY_TITLE = "title";
/*     */   public static final String CUSTOMER_INFO_KEY_AREA = "area";
/*     */   public static final String CUSTOMER_INFO_KEY_BACKGROUND = "background";
/*     */   public static final String CUSTOMER_INFO_KEY_LASTCONTACTDATE = "lastContactDate";
/*     */   public static final String CUSTOMER_INFO_KEY_NEXTCONTACTDATE = "nextContactDate";
/*     */   public static final String CUSTOMER_INFO_KEY_ASSIGNDATE = "assignDate";
/*     */   public static final String CUSTOMER_INFO_KEY_CREATEDATE = "createDate";
/*     */   public static final String CUSTOMER_INFO_KEY_CREATEUSERID = "createUserId";
/*     */   public static final String CUSTOMER_INFO_KEY_UPDATEUSERID = "updateUserId";
/*     */   public static final String CUSTOMER_INFO_KEY_CATEGORY = "category";
/*     */   public static final String CUSTOMER_INFO_KEY_IM = "im";
/*     */   public static final String CUSTOMER_EXT_INFO_KEY_PHONE = "phone";
/*     */   public static final int CUSTOMER_EXT_INFO_TYPE_PHONE = 1;
/*     */   public static final String CUSTOMER_EXT_INFO_KEY_EMAIL = "email";
/*     */   public static final int CUSTOMER_EXT_INFO_TYPE_EMAIL = 2;
/*     */   public static final String CUSTOMER_EXT_INFO_KEY_IM = "im";
/*     */   public static final int CUSTOMER_EXT_INFO_TYPE_IM = 3;
/*     */   public static final String CUSTOMER_EXT_INFO_KEY_WEBSITE = "website";
/*     */   public static final int CUSTOMER_EXT_INFO_TYPE_WEBSITE = 4;
/*     */   public static final String CUSTOMER_EXT_INFO_KEY_WEIBO = "weibo";
/*     */   public static final int CUSTOMER_EXT_INFO_TYPE_WEIBO = 5;
/*     */   public static final String CUSTOMER_EXT_INFO_KEY_ADDRESS = "address";
/*     */   public static final int CUSTOMER_EXT_INFO_TYPE_ADDRESS = 6;
/*     */   public static final String CUSTOMER_EXT_INFO_KEY_ALL = "all";
/*     */   public static final int VISIBLE_EVERYONE = 1;
/*     */   public static final int VISIBLE_GROUP = 3;
/*     */   public static final int VISIBLE_PERSON = 4;
/*     */   public static final int VISIBLE_SHARE_OWNER = 5;
/*     */   public static final int VISIBLE_SHARE_OTHER = 6;
/*     */   public static final String TAG_SPLIT1 = ",";
/*     */   public static final String TAG_SPLIT2 = "~";
/*     */   public static final int TYPE_NONE = -1;
/*     */   public static final int TYPE_COMPANY = 0;
/*     */   public static final int TYPE_PEOPLE = 1;
/*     */   public static final int TYPE_DEAL = 2;
/*     */   public static final int TYPE_WHITEBOARD = 3;
/*     */   public static final int SHARE_TYPE_USER = 1;
/*     */   public static final int SHARE_TYPE_GROUP = 2;
/*     */   public static final String NOPERMISSION_PAGE = "/nopermission.jsp";
/*     */   public static final String ERROR_PAGE = "/errorpage.jsp";
/*     */   public static final String SIGNIN_PAGE = "/signin";
/*     */   public static final String TASK_UPDATE_TYPE_SETUNFINISH = "0";
/*     */   public static final String TASK_UPDATE_TYPE_SETFINISH = "1";
/*     */   public static final String TASK_UPDATE_TYPE_DUEDATE = "2";
/*     */   public static final String TASK_UPDATE_TYPE_ALL = "3";
/*     */   public static final int NOTE_TYPE_FINISHTASK = 3;
/*     */   public static final int NOTE_TYPE_USER = 2;
/*     */   public static final int NOTE_TYPE_SYSTEM = 1;
/*     */   public static final int DEAL_MASTER = 1;
/*     */   public static final int DEAL_SALVE = 0;
/*     */   public static final int DEAL_STATUS_PENDING = 1;
/*     */   public static final int DEAL_STATUS_WON = 2;
/*     */   public static final int DEAL_STATUS_LOST = 3;
/*     */   public static final int DEAL_STATUS_CONFIRM = 4;
/*     */   public static final String DEAL_TYPE_CREATE = "0";
/*     */   public static final String DEAL_TYPE_PENDING = "1";
/*     */   public static final String DEAL_TYPE_WON = "2";
/*     */   public static final String DEAL_TYPE_LOST = "3";
/*     */   public static final String TASK_COLLECTION_UNCOMING = "0";
/*     */   public static final String TASK_COLLECTION_COMPLETED = "1";
/*     */   public static final String TASK_COLLECTION_ASSIGN = "2";
/*     */   public static final String SESSION_USER = "user";
/*     */   public static final String SESSION_BLOGOU = "blogou";
/*     */   public static final String SESSION_ADMIN = "admin";
/*     */   public static final String SESSION_VOIP = "voip";
/*     */   public static final String SESSION_VOIP_SEATS = "seatsInfo";
/*     */   public static final String SESSION_UID = "uid";
/*     */   public static final String SESSION_CID = "cid";
/*     */   public static final String APPLICATION_COMPANYS = "companys";
/*     */   public static final String APPLICATION_TASKCATEGORY = "taskcategory";
/*     */   public static final String APPLICATION_GROUP = "group";
/*     */   public static final String APPLICATION_UPGRADESQL_NEED = "needUpgradeSQL";
/*     */   public static final String IMAGE_AVATAR_COMPANY = "images/avatar_company.png";
/*     */   public static final String IMAGE_AVATAR_PERSON = "images/avatar_person.png";
/*     */   public static final String IMAGE_AVATAR_DEFAULT = "images/avatar.png";
/*     */   public static final int DEAL_NOTE_SHORTLENGTH = 200;
/*     */   public static final int PAGE_SIZE = 10;
/*     */   public static final int USER_OPERATIONFLAG_INDEX_EXPORT = 0;
/*     */   public static final int USER_OPERATIONFLAG_INDEX_DELETE = 1;
/*     */   public static final String IMAGE_AVATAR_PATH = "images/upload/identity/";
/*     */   public static final String IMAGE_COMPANY_AVATAR_PATH = "images/upload/company/";
/*     */   public static final String IMAGE_PEOPLE_AVATAR_PATH = "images/upload/people/";
/*     */   public static final String IMAGE_WHITEBOARD_PATH = "images/upload/whiteboard/";
/*     */   public static final String IMAGE_LOGO_PATH = "images/upload/logo/";
/*     */   public static final String FILEUPLOAD_PATH = "uploadfiles/";
/*     */   public static final String EXPORT_CUSTOMERS_PATH = "export/";
/*     */   public static final String EXPORT_RECORD_PATH = "recording/";
/*     */   public static final String LUCENE_PATH = "lucene/";
/*     */   public static final String IMAGE_NOTFOUND = "images/404.png";
/*     */   public static final String SQL_SETUP_FILE = "sql/createTable.sql";
/*     */   public static final String SQL_UPGRADE_FILE = "sql/upgradeTable.sql";
/*     */   public static final String SQL_SETUP_LOCK_FILE = "sql/setup.lock";
/*     */   public static final String SQL_SETUP_UPGRADESQL_NEED_FILE = "sql/upgradeSQL.need";
/*     */   public static final String MY_DB_SETTING = "dbsetting.properties";
/*     */   public static final String RECORDING_FILE = "recording";
/*     */   public static final String FIELD_KEY = "field";
/*     */   public static final String FIELDID_KEY = "fieldId";
/*     */   public static final int CUSTOMER_FIELD_ID_START = 99;
/*     */   public static final String COOKIE_KEY = "sessionKey";
/*     */   public static final String COOKIE_PARTY_FILTERS = "party_filters";
/*     */   public static final String COOKIE_DEALS_FILTERS = "deals_filters";
/*     */   public static final String COOKIE_USERID = "userId";
/*     */   public static final int SECONDS_PER_YEAR = 31536000;
/*     */   public static final int UPLOAD_FILE_SAMPLE_DATE_SIZE = 10;
/*     */   public static final String FILE_TYPE_EXCEL = "excel";
/*     */   public static final String FILE_TYPE_CSV = "csv";
/*     */   public static final String FILE_TYPE_XML = "xml";
/* 913 */   public static final String[] ARRAY_CUSTOMER_EXT_INFO2 = { "", "工作", "其他" };
/*     */ 
/* 915 */   public static final String[] ARRAY_CUSTOMER_EXT_PHONE_INFO2 = { "", "工作", 
/* 916 */     "手机", "传真", "其他" };
/*     */ 
/* 918 */   public static final String[] ARRAY_CUSTOMER_EXT_IM_INFO2 = { "工作", "个人", 
/* 919 */     "其他" };
/*     */   public static final int CUSTOMER_FIELD_TYPE_ALL = 0;
/*     */   public static final int CUSTOMER_FIELD_TYPE_COMPANY = 1;
/*     */   public static final int CUSTOMER_FIELD_TYPE_PEOPLE = 2;
/*     */   public static final int CONDITION_TYPE_OVERDUE = -1;
/*     */   public static final int CONDITION_TYPE_YESTERDAY = 0;
/*     */   public static final int CONDITION_TYPE_TODAY = 1;
/*     */   public static final int CONDITION_TYPE_TOMORROW = 2;
/*     */   public static final int CONDITION_TYPE_THISWEEK = 3;
/*     */   public static final int CONDITION_TYPE_NEXTWEEK = 4;
/*     */   public static final int CONDITION_TYPE_THISMONTH = 5;
/*     */   public static final int CONDITION_TYPE_CUSTOME = 99;
/*     */   public static final int CONDITION_NOTCONTACT_TYPE_NONE = 1;
/*     */   public static final int CONDITION_NOTCONTACT_TYPE_WEEK = 2;
/*     */   public static final int CONDITION_NOTCONTACT_TYPE_2WEEK = 3;
/*     */   public static final int CONDITION_NOTCONTACT_TYPE_MONTH = 4;
/*     */   public static final int CONDITION_CONTACT_TYPE_TODAY = 1;
/*     */   public static final int CONDITION_CONTACT_TYPE_YESTODAY = 2;
/*     */   public static final int CONDITION_CONTACT_TYPE_WEEK = 3;
/*     */   public static final int CONDITION_CONTACT_TYPE_2WEEK = 4;
/*     */   public static final int CONDITION_CONTACT_TYPE_MONTH = 5;
/*     */   public static final int CUSTOMER_CATEGORY_COMPANY = 1;
/*     */   public static final int FIELD_TYPE_TEXT = 0;
/*     */   public static final int FIELD_TYPE_NUMBER = 1;
/*     */   public static final int FIELD_TYPE_DATE = 2;
/*     */   public static final int FIELD_TYPE_SELECT = 3;
/*     */   public static final int FIELD_TYPE_CHECKBOX = 4;
/*     */   public static final int RECENTLYVIEWED_MAX = 10;
/*     */   public static final String NOTE_UPDATE_TYPE_CUSTOMER = "1";
/*     */   public static final String NOTE_UPDATE_TYPE_DEAL = "2";
/*     */   public static final String NOTE_UPDATE_TYPE_MIN = "3";
/*     */   public static final String IMGAGE_TYPE_JPG = ".jpg";
/*     */   public static final String IMGAGE_TYPE_PNG = ".png";
/*     */   public static final String IMGAGE_TYPE_GIF = ".gif";
/*     */   public static final String USERID_ADMIN = "admin";
/*     */   public static final String USERID_SYSTEM = "system";
/*     */   public static final int USER_EXT_PAGESIZE = 1;
/*     */   public static final int USER_EXT_MAXCOMPANYNUM = 2;
/*     */   public static final int USER_EXT_VIEWCUSOTERIDS = 3;
/*     */   public static final int USER_EXT_SHOWCUSTOMERFIELD = 4;
/*     */   public static final String PERMISSIONSID_ALL = "*";
/*     */   public static final String IM_QQ = "QQ";
/*     */   public static final String CUSTOMER_EXT_PHONE_MOBILE = "手机";
/*     */   public static final String ERROR_SMS_NOTSETIONG = "您还未开通短信平台";
/*     */   public static final int CELL_MAX_LENGTH = 32767;
/*     */   public static final String VISIBLE_EVERY_STRING = "公共数据";
/*     */   public static final String MYSELF_STRING = "我";
/*     */   public static final String DB_USER_NAME = "qikebao";
/*     */   public static final String DB_USER_PASSWORD = "crm";
/*     */   public static final String URL_STATISTICS = "http://tj.qikebao.com/log";
/*     */   public static final String URL_UPGRADE = "http://tj.qikebao.com/checkUpgrade.jsp?callback=?";
/*     */   public static final int WHITEBOARD_TYPE_USER = 0;
/*     */   public static final int WHITEBOARD_TYPE_SYSTEM = 1;
/*     */   public static final int SYSTEM_SETTING_MAXNOTCONATCTDAY_KEY = 1;
/*     */   public static final int SYSTEM_SETTING_MAXNOTCONATCTDAY_DEFAULT = 0;
/*     */   public static final String SYSTEM_SETTING_MAXNOTCONATCTCATEGORY_ALL = "*";
/*     */   public static final String SYSTEM_SETTING_MAXPUBLIC_ALL = "*";
/*     */   public static final int SYSTEM_SETTING_CSS_KEY = 2;
/*     */   public static final String SYSTEM_SETTING_CSS_DEFAULT = "yellow";
/*     */   public static final int SYSTEM_SETTING_LOGO_KEY = 3;
/*     */   public static final String SYSTEM_SETTING_VOIP_CALL_URL = "http://ucpaas.qikebao.com/call";
/*     */   public static final String SYSTEM_SETTING_VOIP_ACCOUNT_URL = "http://ucpaas.qikebao.com/account";
/*     */   public static final int SYSTEM_SETTING_VOIP_USER_KEY = 4;
/*     */   public static final int SYSTEM_SETTING_VOIP_PWD_KEY = 5;
/*     */   public static final int SYSTEM_SETTING_VOIP_IP_KEY = 6;
/*     */   public static final int SYSTEM_SETTING_VOIP_TYPE_KEY = 7;
/*     */   public static final int SYSTEM_SETTING_YUNSOU_KEY = 8;
/*     */   public static final int SYSTEM_SETTING_YUNSOU_USERS = 9;
/*     */   public static final int SYSTEM_SETTING_YUNSOU_USERNUM = 10;
/*     */   public static final int SYSTEM_SETTING_PUBLIC_DATA = 11;
/*     */   public static final int SYSTEM_SETTING_CLOSE_GROUP_PUBLIC_DATA = 12;
/*     */   public static final int SYSTEM_SETTING_PUBLIC_READLONY = 13;
/*     */   public static final int SETUP_BANGKEBAO_ACTIVECODE = 14;
/*     */   public static final int SETUP_BANGKEBAO_COMPANYID = 15;
/*     */   public static final int SETUP_BANGKEBAO_CHECKCODE = 16;
/*     */   public static final int SETUP_BANGKEBAO_LICENCENUM = 17;
/*     */   public static final int SETUP_BANGKEBAO_EXPIREDATE = 18;
/*     */   public static final int SYSTEM_OPENAPI_TOKEN = 19;
/*     */   public static final String SORT_NAME = "Name";
/*     */   public static final String SORT_LASTCONTACTDATE = "LastContactDate";
/*     */   public static final String SORT_CREATEDATE = "CreateDate";
/*     */   public static final String SETUP_BANGKEBAO_ACTIVE_URL = "http://oem.qikebao.com/activeCode";
/*     */   public static final String OPENAIP_URL = "http://127.0.0.1:8080/newCRM/openAPI";
/*     */   public static final String SYSTEM_SETTING_YUNSOU_ACTIVE_URL = "http://so.qikebao.com/qisoukeActivation/serial";
/*     */   public static final String SYSTEM_SETTING_YUNSOU_AUTH_URL = "http://so.qikebao.com/qisoukeActivation/usersList";
/*     */   public static final String QISOUKE_URL = "http://so.qikebao.com/qisouke";
/*     */   public static final int YUNSOU_HISTORY_MAX = 11;
/*     */   public static final String YUNSOU_SPAM_KEY = "kkddkdddkj0";
/*     */   public static final String CATEGORY_NONE = "无分类";
/*     */   public static final int TIME_TWO_HOUR = 7200000;
/*     */   public static final String ERROR_CODE_NOLOGIN = "-1";
/*     */   public static final int DOWNLOAD_TYPE_ATTACHMENT = 1;
/*     */   public static final int DOWNLOAD_TYPE_EXPORT = 2;
/*     */   public static final int DOWNLOAD_TYPE_RECORD = 3;
/*     */   public static final String LUCENE_FIELD_CUSTOMERID = "customerId";
/*     */   public static final String LUCENE_FIELD_NAME = "name";
/*     */   public static final String LUCENE_FIELD_TYPE = "type";
/*     */   public static final String LUCENE_FIELD_TITLE = "title";
/*     */   public static final String LUCENE_FIELD_VISIBLE = "visible";
/*     */   public static final String LUCENE_FIELD_PERMISSIONSID = "permissionsId";
/*     */   public static final String LUCENE_FIELD_EXTINFO = "info";
/*     */   public static final int SEX_MAN = 1;
/*     */   public static final int SEX_WOMAN = 0;
/*     */   public static final int GROUP_LEVEL_ADMIN = 1;
/*     */   public static final int GROUP_LEVEL_NORMAL = 0;
/*     */   public static final String USER_AGENT = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.6; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET CLR 1.1.4322; .NET4.0C)";
/*     */   public static final String UCPAAS_URL = "ucpaas.qikebao.com";
/*     */   public static final int CALL_TYPE_OUT = 1;
/*     */   public static final int CALL_TYPE_IN = 2;
/*     */   public static final String PHONE_AREA_360_URL = "http://cx.shouji.360.cn/phonearea.php?number=";
/*     */   public static final String QIKEBAO_IMAGE_ROOT_URL = "http://www.qikebao.com/web";
/*     */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.config.Const
 * JD-Core Version:    0.6.1
 */